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

Method __init__

test/functional/test_framework/messages.py:805–821  ·  view source on GitHub ↗
(self, tx=None)

Source from the content-addressed store, hash-verified

803 "wit")
804
805 def __init__(self, tx=None):
806 if tx is None:
807 self.nVersion = 2
808 self.vin = []
809 self.vout = []
810 self.wit = CTxWitness()
811 self.nLockTime = 0
812 self.sha256 = None
813 self.hash = None
814 else:
815 self.nVersion = tx.nVersion
816 self.vin = copy.deepcopy(tx.vin)
817 self.vout = copy.deepcopy(tx.vout)
818 self.nLockTime = tx.nLockTime
819 self.sha256 = tx.sha256
820 self.hash = tx.hash
821 self.wit = copy.deepcopy(tx.wit)
822
823 def deserialize(self, f):
824 self.nVersion = struct.unpack("<i", f.read(4))[0]

Callers

nothing calls this directly

Calls 1

CTxWitnessClass · 0.70

Tested by

no test coverage detected