def peer_has_block(self, header_hash: bytes32, peer_id: bytes32, weight: uint128, height: uint32, new_peak: bool):
    '\n        Adds a record that a certain peer has a block.\n        '
    if (header_hash == self.sync_target_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 new_peak:
        self.peer_to_peak[peer_id] = (header_hash, height, weight)
Adds a record that a certain peer has a block.
def peer_has_block(self, header_hash: bytes32, peer_id: bytes32, weight: uint128, height: uint32, new_peak: bool):
    '\n        \n        '
    if (header_hash == self.sync_target_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 new_peak:
        self.peer_to_peak[peer_id] = (header_hash, height, weight)