MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / deserialize

Method deserialize

test/functional/test_framework/messages.py:738–747  ·  view source on GitHub ↗
(self, f)

Source from the content-addressed store, hash-verified

736 self.prefilled_txn = []
737
738 def deserialize(self, f):
739 self.header.deserialize(f, legacy=False)
740 self.nonce = struct.unpack("<Q", f.read(8))[0]
741 self.shortids_length = deser_compact_size(f)
742 for i in range(self.shortids_length):
743 # shortids are defined to be 6 bytes in the spec, so append
744 # two zero bytes and read it in as an 8-byte number
745 self.shortids.append(struct.unpack("<Q", f.read(6) + b'\x00\x00')[0])
746 self.prefilled_txn = deser_vector(f, PrefilledTransaction)
747 self.prefilled_txn_length = len(self.prefilled_txn)
748
749 # When using version 2 compact blocks, we must serialize with_witness.
750 def serialize(self, with_witness=False):

Callers

nothing calls this directly

Calls 4

deser_vectorFunction · 0.85
deser_compact_sizeFunction · 0.70
deserializeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected