MCPcopy Create free account
hub / github.com/ElementsProject/elements / CMerkleBlock

Class CMerkleBlock

test/functional/test_framework/messages.py:1513–1531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1511
1512
1513class CMerkleBlock:
1514 __slots__ = ("header", "txn")
1515
1516 def __init__(self):
1517 self.header = CBlockHeader()
1518 self.txn = CPartialMerkleTree()
1519
1520 def deserialize(self, f):
1521 self.header.deserialize(f)
1522 self.txn.deserialize(f)
1523
1524 def serialize(self):
1525 r = b""
1526 r += self.header.serialize()
1527 r += self.txn.serialize()
1528 return r
1529
1530 def __repr__(self):
1531 return "CMerkleBlock(header=%s, txn=%s)" % (repr(self.header), repr(self.txn))
1532
1533
1534# Objects that correspond to messages on the wire

Callers 2

run_testMethod · 0.90
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected