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

Method from_txin

bitcoin/core/__init__.py:180–190  ·  view source on GitHub ↗

Create an immutable copy of an existing TxIn If txin is already immutable (txin.__class__ is CTxIn) it is returned directly.

(cls, txin)

Source from the content-addressed store, hash-verified

178
179 @classmethod
180 def from_txin(cls, txin):
181 """Create an immutable copy of an existing TxIn
182
183 If txin is already immutable (txin.__class__ is CTxIn) it is returned
184 directly.
185 """
186 if txin.__class__ is CTxIn:
187 return txin
188
189 else:
190 return cls(COutPoint.from_outpoint(txin.prevout), txin.scriptSig, txin.nSequence)
191
192@__make_mutable
193class CMutableTxIn(CTxIn):

Callers 2

__init__Method · 0.45
from_txMethod · 0.45

Calls 1

from_outpointMethod · 0.45

Tested by

no test coverage detected