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

Method from_txwitness

bitcoin/core/__init__.py:334–343  ·  view source on GitHub ↗

Create an immutable copy of an existing TxWitness If txwitness is already immutable (txwitness.__class__ is CTxWitness) it is returned directly.

(cls, txwitness)

Source from the content-addressed store, hash-verified

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
346class CTransaction(ImmutableSerializable):

Callers 1

__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected