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)
| 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 |
| 263 | class CMutableTxOut(CTxOut): |