diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-22 13:57:12 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-29 07:17:36 +0200 |
commit | fa5591d38cfc917235a3dffd61c36dbf1f781a4d (patch) | |
tree | 4b1aa00c57c58d6b7c6869397d2fc6d50064e596 | |
parent | fa5f938cfe4264054e9017fbe710c81e7b3bb150 (diff) |
test: Hide tx rehash in helper
This avoids code-bloat and accidentally forgetting to call it
-rwxr-xr-x | test/functional/feature_cltv.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py index 5c4512c387..49dea28c4e 100755 --- a/test/functional/feature_cltv.py +++ b/test/functional/feature_cltv.py @@ -51,6 +51,7 @@ def cltv_modify_tx(node, tx, prepend_scriptsig, nsequence=None, nlocktime=None): tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex']))) tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(tx.vin[0].scriptSig))) + tx.rehash() return tx @@ -124,7 +125,6 @@ class BIP65Test(BitcoinTestFramework): spendtx = create_transaction(self.nodes[0], self.coinbase_txids[i], self.nodeaddress, amount=1.0) spendtx = cltv_invalidate(self.nodes[0], spendtx, i) - spendtx.rehash() invalid_ctlv_txs.append(spendtx) tip = self.nodes[0].getbestblockhash() @@ -161,7 +161,6 @@ class BIP65Test(BitcoinTestFramework): spendtx = create_transaction(self.nodes[0], self.coinbase_txids[10+i], self.nodeaddress, amount=1.0) spendtx = cltv_invalidate(self.nodes[0], spendtx, i) - spendtx.rehash() expected_cltv_reject_reason = [ "non-mandatory-script-verify-flag (Operation not valid with the current stack size)", @@ -195,7 +194,6 @@ class BIP65Test(BitcoinTestFramework): self.log.info("Test that a version 4 block with a valid-according-to-CLTV transaction is accepted") spendtx = cltv_validate(self.nodes[0], spendtx, CLTV_HEIGHT - 1) - spendtx.rehash() block.vtx.pop(1) block.vtx.append(spendtx) |