(tx, prepend_scriptsig, nsequence=None, nlocktime=None)
| 36 | # 1) prepending a given script to the scriptSig of vin 0 and |
| 37 | # 2) (optionally) modify the nSequence of vin 0 and the tx's nLockTime |
| 38 | def cltv_modify_tx(tx, prepend_scriptsig, nsequence=None, nlocktime=None): |
| 39 | assert_equal(len(tx.vin), 1) |
| 40 | if nsequence is not None: |
| 41 | tx.vin[0].nSequence = nsequence |
| 42 | tx.nLockTime = nlocktime |
| 43 | |
| 44 | tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(tx.vin[0].scriptSig))) |
| 45 | tx.rehash() |
| 46 | |
| 47 | |
| 48 | def cltv_invalidate(tx, failure_reason): |
no test coverage detected