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)
| 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. |
no outgoing calls
no test coverage detected