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

Class COutPoint

test/functional/test_framework/messages.py:366–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364
365
366class COutPoint:
367 __slots__ = ("hash", "n")
368
369 def __init__(self, hash=0, n=0):
370 self.hash = hash
371 self.n = n
372
373 def isNull(self):
374 return self.hash == 0 and self.n == 4294967295
375
376 def deserialize(self, f):
377 self.hash = deser_uint256(f)
378 self.n = struct.unpack("<I", f.read(4))[0]
379
380 def serialize(self):
381 r = b""
382 r += ser_uint256(self.hash)
383 r += struct.pack("<I", self.n)
384 return r
385
386 def __repr__(self):
387 return "COutPoint(hash=%064x n=%i)" % (self.hash, self.n)
388
389OUTPOINT_ISSUANCE_FLAG = (1 << 31)
390OUTPOINT_PEGIN_FLAG = (1 << 30)

Callers 15

run_testMethod · 0.90
pegin_testMethod · 0.90
issuance_testMethod · 0.90
run_testMethod · 0.90
serializeMethod · 0.90
run_testMethod · 0.90
make_utxosMethod · 0.90

Calls

no outgoing calls