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

Method deserialize

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

Source from the content-addressed store, hash-verified

443 self.assetIssuance = CAssetIssuance()
444
445 def deserialize(self, f):
446 self.prevout = COutPoint()
447 self.prevout.deserialize(f)
448
449 has_asset_issuance = False
450 # Do masking, extract presence of assetIssuance
451 if not self.prevout.isNull(): # ignore coinbase for issuance/pegin
452 if self.prevout.n & OUTPOINT_ISSUANCE_FLAG > 0:
453 has_asset_issuance = True
454 if self.prevout.n & OUTPOINT_PEGIN_FLAG > 0:
455 self.m_is_pegin = True
456 self.prevout.n = self.prevout.n & OUTPOINT_INDEX_MASK
457
458 self.scriptSig = deser_string(f)
459 self.nSequence = struct.unpack("<I", f.read(4))[0]
460
461 if has_asset_issuance:
462 self.assetIssuance = CAssetIssuance()
463 self.assetIssuance.deserialize(f)
464
465 def serialize(self):
466 outpoint = COutPoint()

Callers

nothing calls this directly

Calls 6

COutPointClass · 0.70
deser_stringFunction · 0.70
CAssetIssuanceClass · 0.70
deserializeMethod · 0.45
isNullMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected