MCPcopy
hub / github.com/petertodd/python-bitcoinlib / from_txout

Method from_txout

bitcoin/core/__init__.py:250–260  ·  view source on GitHub ↗

Create an immutable copy of an existing TxOut If txout is already immutable (txout.__class__ is CTxOut) then it will be returned directly.

(cls, txout)

Source from the content-addressed store, hash-verified

248
249 @classmethod
250 def from_txout(cls, txout):
251 """Create an immutable copy of an existing TxOut
252
253 If txout is already immutable (txout.__class__ is CTxOut) then it will
254 be returned directly.
255 """
256 if txout.__class__ is CTxOut:
257 return txout
258
259 else:
260 return cls(txout.nValue, txout.scriptPubKey)
261
262@__make_mutable
263class CMutableTxOut(CTxOut):

Callers 2

__init__Method · 0.45
from_txMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected