import struct from lbry.crypto.hash import double_sha256 from lbry.wallet.transaction import Transaction from lbry.wallet.bcd_data_stream import BCDataStream ZERO_BLOCK = bytes((0,)*32) class Block: __slots__ = ( 'version', 'block_hash', 'prev_block_hash', 'merkle_root', 'claim_trie_root', 'timestamp', 'bits', 'nonce', 'txs' ) def __init__(self, stream): stream.read_uint32() # block size header = stream.data.read(112) version, = struct.unpack('