MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / from_tx

Method from_tx

bitcoin/core/__init__.py:424–434  ·  view source on GitHub ↗

Create an immutable copy of a pre-existing transaction If tx is already immutable (tx.__class__ is CTransaction) then it will be returned directly.

(cls, tx)

Source from the content-addressed store, hash-verified

422
423 @classmethod
424 def from_tx(cls, tx):
425 """Create an immutable copy of a pre-existing transaction
426
427 If tx is already immutable (tx.__class__ is CTransaction) then it will
428 be returned directly.
429 """
430 if tx.__class__ is CTransaction:
431 return tx
432
433 else:
434 return cls(tx.vin, tx.vout, tx.nLockTime, tx.nVersion, tx.wit)
435
436 def GetTxid(self):
437 """Get the transaction ID.

Callers 2

RawSignatureHashFunction · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected