Create an immutable copy of an existing TxWitness If txwitness is already immutable (txwitness.__class__ is CTxWitness) it is returned directly.
(cls, txwitness)
| 332 | |
| 333 | @classmethod |
| 334 | def from_txwitness(cls, txwitness): |
| 335 | """Create an immutable copy of an existing TxWitness |
| 336 | |
| 337 | If txwitness is already immutable (txwitness.__class__ is CTxWitness) it is returned |
| 338 | directly. |
| 339 | """ |
| 340 | if txwitness.__class__ is CTxWitness: |
| 341 | return txwitness |
| 342 | else: |
| 343 | return cls(txwitness.vtxinwit) |
| 344 | |
| 345 | |
| 346 | class CTransaction(ImmutableSerializable): |