def verify_generator(self, block: 'Block', generator: 'ExternalAddress'):
    block_header: BlockHeader = block.header
    if ((not block_header.complained) and (block.header.peer_id != generator)):
        exception = RuntimeError(f'Block({block.header.height}, {block.header.hash.hex()}, Generator({block.header.peer_id.hex_xx()}), Expected({generator.hex_xx()}).')
        self._handle_exception(exception)
def verify_generator(self, block: 'Block', generator: 'ExternalAddress'):
    block_header: BlockHeader = block.header
    if ((not block_header.complained) and (block.header.peer_id != generator)):
        exception = RuntimeError(f'Block({block.header.height}, {block.header.hash.hex()}, Generator({block.header.peer_id.hex_xx()}), Expected({generator.hex_xx()}).')
        self._handle_exception(exception)