Create a new transaction vin and vout are iterables of transaction inputs and outputs respectively. If their contents are not already immutable, immutable copies will be made.
(self, vin=(), vout=(), nLockTime=0, nVersion=1, witness=CTxWitness())
| 348 | __slots__ = ['nVersion', 'vin', 'vout', 'nLockTime', 'wit'] |
| 349 | |
| 350 | def __init__(self, vin=(), vout=(), nLockTime=0, nVersion=1, witness=CTxWitness()): |
| 351 | """Create a new transaction |
| 352 | |
| 353 | vin and vout are iterables of transaction inputs and outputs |
| 354 | respectively. If their contents are not already immutable, immutable |
| 355 | copies will be made. |
| 356 | """ |
| 357 | if not (0 <= nLockTime <= 0xffffffff): |
| 358 | raise ValueError('CTransaction: nLockTime must be in range 0x0 to 0xffffffff; got %x' % nLockTime) |
| 359 | object.__setattr__(self, 'nLockTime', nLockTime) |
| 360 | object.__setattr__(self, 'nVersion', nVersion) |
| 361 | object.__setattr__(self, 'vin', tuple(CTxIn.from_txin(txin) for txin in vin)) |
| 362 | object.__setattr__(self, 'vout', tuple(CTxOut.from_txout(txout) for txout in vout)) |
| 363 | object.__setattr__(self, 'wit', CTxWitness.from_txwitness(witness)) |
| 364 | |
| 365 | @classmethod |
| 366 | def stream_deserialize(cls, f): |
nothing calls this directly
no test coverage detected