def __init__(self, tx=None):
    if (tx is None):
        self.nVersion = 1
        self.vin = []
        self.vout = []
        self.wit = CTxWitness()
        self.nLockTime = 0
        self.sha256 = None
        self.hash = None
    else:
        self.nVersion = tx.nVersion
        self.vin = copy.deepcopy(tx.vin)
        self.vout = copy.deepcopy(tx.vout)
        self.nLockTime = tx.nLockTime
        self.sha256 = tx.sha256
        self.hash = tx.hash
        self.wit = copy.deepcopy(tx.wit)
def __init__(self, tx=None):
    if (tx is None):
        self.nVersion = 1
        self.vin = []
        self.vout = []
        self.wit = CTxWitness()
        self.nLockTime = 0
        self.sha256 = None
        self.hash = None
    else:
        self.nVersion = tx.nVersion
        self.vin = copy.deepcopy(tx.vin)
        self.vout = copy.deepcopy(tx.vout)
        self.nLockTime = tx.nLockTime
        self.sha256 = tx.sha256
        self.hash = tx.hash
        self.wit = copy.deepcopy(tx.wit)