@@ -51,6 +51,7 @@ def cltv_modify_tx(node, tx, prepend_scriptsig, nsequence=None, nlocktime=None):
51
51
tx .deserialize (BytesIO (hex_str_to_bytes (signed_result ['hex' ])))
52
52
53
53
tx .vin [0 ].scriptSig = CScript (prepend_scriptsig + list (CScript (tx .vin [0 ].scriptSig )))
54
+ tx .rehash ()
54
55
return tx
55
56
56
57
@@ -124,7 +125,6 @@ def run_test(self):
124
125
spendtx = create_transaction (self .nodes [0 ], self .coinbase_txids [i ],
125
126
self .nodeaddress , amount = 1.0 )
126
127
spendtx = cltv_invalidate (self .nodes [0 ], spendtx , i )
127
- spendtx .rehash ()
128
128
invalid_ctlv_txs .append (spendtx )
129
129
130
130
tip = self .nodes [0 ].getbestblockhash ()
@@ -161,7 +161,6 @@ def run_test(self):
161
161
spendtx = create_transaction (self .nodes [0 ], self .coinbase_txids [10 + i ],
162
162
self .nodeaddress , amount = 1.0 )
163
163
spendtx = cltv_invalidate (self .nodes [0 ], spendtx , i )
164
- spendtx .rehash ()
165
164
166
165
expected_cltv_reject_reason = [
167
166
"non-mandatory-script-verify-flag (Operation not valid with the current stack size)" ,
@@ -195,7 +194,6 @@ def run_test(self):
195
194
196
195
self .log .info ("Test that a version 4 block with a valid-according-to-CLTV transaction is accepted" )
197
196
spendtx = cltv_validate (self .nodes [0 ], spendtx , CLTV_HEIGHT - 1 )
198
- spendtx .rehash ()
199
197
200
198
block .vtx .pop (1 )
201
199
block .vtx .append (spendtx )
0 commit comments