def METHOD_NAME(
    self, header_hash: bytes32, peer_id: bytes32, weight: uint128, height: uint32, new_peak: bool
) -> None:
    """
    Adds a record that a certain peer has a block.
    """
    if self.target_peak is not None and header_hash == self.target_peak.header_hash:
        self.peers_changed.set()
    if header_hash in self.peak_to_peer:
        self.peak_to_peer[header_hash].add(peer_id)
    else:
        self.peak_to_peer[header_hash] = {peer_id}
        if len(self.peak_to_peer) > 256:  # nice power of two
            item = self.peak_to_peer.popitem(last=False)  # Remove the oldest entry
            # sync target hash is used throughout the sync process and should not be deleted.
            if self.target_peak is not None and item[0] == self.target_peak.header_hash:
                self.peak_to_peer[item[0]] = item[1]  # Put it back in if it was the sync target
                self.peak_to_peer.popitem(last=False)  # Remove the oldest entry again
    if new_peak:
        self.peer_to_peak[peer_id] = Peak(header_hash, height, weight)