from .tools import * from .transaction import Transaction from struct import pack, unpack class Block(dict): def __init__(self, block): s = get_stream(block) self["header"] = s.read(80) self["hash"] = double_sha256(self["header"]) self["version"] = unpack("