diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-22 14:16:42 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-29 07:17:32 +0200 |
commit | fa5f938cfe4264054e9017fbe710c81e7b3bb150 (patch) | |
tree | 6e08864de6958c8708846f99bec3d16b86d22c5a /test/functional | |
parent | fb66dbe786ff3028d8f2b0be503ddd3b36541798 (diff) |
test: Remove new_tx reference
new_tx is a reference to tx. To avoid confusion and code-bloat, remove it
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/feature_cltv.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py index f2130fb588..5c4512c387 100755 --- a/test/functional/feature_cltv.py +++ b/test/functional/feature_cltv.py @@ -47,13 +47,11 @@ def cltv_modify_tx(node, tx, prepend_scriptsig, nsequence=None, nlocktime=None): # Need to re-sign, since nSequence and nLockTime changed signed_result = node.signrawtransactionwithwallet(ToHex(tx)) - new_tx = CTransaction() - new_tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex']))) - else: - new_tx = tx + tx = CTransaction() + tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex']))) - new_tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(new_tx.vin[0].scriptSig))) - return new_tx + tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(tx.vin[0].scriptSig))) + return tx def cltv_invalidate(node, tx, failure_reason): |