Skip to content

Commit fa5f938

Browse files
author
MarcoFalke
committed
test: Remove new_tx reference
new_tx is a reference to tx. To avoid confusion and code-bloat, remove it
1 parent fb66dbe commit fa5f938

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/functional/feature_cltv.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ def cltv_modify_tx(node, tx, prepend_scriptsig, nsequence=None, nlocktime=None):
4747

4848
# Need to re-sign, since nSequence and nLockTime changed
4949
signed_result = node.signrawtransactionwithwallet(ToHex(tx))
50-
new_tx = CTransaction()
51-
new_tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex'])))
52-
else:
53-
new_tx = tx
50+
tx = CTransaction()
51+
tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex'])))
5452

55-
new_tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(new_tx.vin[0].scriptSig)))
56-
return new_tx
53+
tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(tx.vin[0].scriptSig)))
54+
return tx
5755

5856

5957
def cltv_invalidate(node, tx, failure_reason):

0 commit comments

Comments
 (0)