mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
test: Hide tx rehash in helper
This avoids code-bloat and accidentally forgetting to call it
This commit is contained in:
parent
fa5f938cfe
commit
fa5591d38c
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue