@@ -246,7 +246,7 @@ def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock):
246246 tx .wit .vtxinwit [0 ].scriptWitness .stack = [CScript ([OP_TRUE ])]
247247 tx .vout = [CTxOut (int (orig_tx .vout [0 ].nValue - relayfee * COIN ), SCRIPT_W0_SH_OP_TRUE )]
248248
249- if (orig_tx .hash in node .getrawmempool ()):
249+ if (orig_tx .txid_hex in node .getrawmempool ()):
250250 # sendrawtransaction should fail if the tx is in the mempool
251251 assert_raises_rpc_error (- 26 , NOT_FINAL_ERROR , self .wallet .sendrawtransaction , from_node = node , tx_hex = tx .serialize ().hex ())
252252 else :
@@ -260,43 +260,43 @@ def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock):
260260
261261 # Now mine some blocks, but make sure tx2 doesn't get mined.
262262 # Use prioritisetransaction to lower the effective feerate to 0
263- self .nodes [0 ].prioritisetransaction (txid = tx2 .hash , fee_delta = int (- self .relayfee * COIN ))
263+ self .nodes [0 ].prioritisetransaction (txid = tx2 .txid_hex , fee_delta = int (- self .relayfee * COIN ))
264264 cur_time = int (time .time ())
265265 for _ in range (10 ):
266266 self .nodes [0 ].setmocktime (cur_time + 600 )
267267 self .generate (self .wallet , 1 , sync_fun = self .no_op )
268268 cur_time += 600
269269
270- assert tx2 .hash in self .nodes [0 ].getrawmempool ()
270+ assert tx2 .txid_hex in self .nodes [0 ].getrawmempool ()
271271
272272 test_nonzero_locks (tx2 , self .nodes [0 ], self .relayfee , use_height_lock = True )
273273 test_nonzero_locks (tx2 , self .nodes [0 ], self .relayfee , use_height_lock = False )
274274
275275 # Mine tx2, and then try again
276- self .nodes [0 ].prioritisetransaction (txid = tx2 .hash , fee_delta = int (self .relayfee * COIN ))
276+ self .nodes [0 ].prioritisetransaction (txid = tx2 .txid_hex , fee_delta = int (self .relayfee * COIN ))
277277
278278 # Advance the time on the node so that we can test timelocks
279279 self .nodes [0 ].setmocktime (cur_time + 600 )
280280 # Save block template now to use for the reorg later
281281 tmpl = self .nodes [0 ].getblocktemplate (NORMAL_GBT_REQUEST_PARAMS )
282282 self .generate (self .nodes [0 ], 1 )
283- assert tx2 .hash not in self .nodes [0 ].getrawmempool ()
283+ assert tx2 .txid_hex not in self .nodes [0 ].getrawmempool ()
284284
285285 # Now that tx2 is not in the mempool, a sequence locked spend should
286286 # succeed
287287 tx3 = test_nonzero_locks (tx2 , self .nodes [0 ], self .relayfee , use_height_lock = False )
288- assert tx3 .hash in self .nodes [0 ].getrawmempool ()
288+ assert tx3 .txid_hex in self .nodes [0 ].getrawmempool ()
289289
290290 self .generate (self .nodes [0 ], 1 )
291- assert tx3 .hash not in self .nodes [0 ].getrawmempool ()
291+ assert tx3 .txid_hex not in self .nodes [0 ].getrawmempool ()
292292
293293 # One more test, this time using height locks
294294 tx4 = test_nonzero_locks (tx3 , self .nodes [0 ], self .relayfee , use_height_lock = True )
295- assert tx4 .hash in self .nodes [0 ].getrawmempool ()
295+ assert tx4 .txid_hex in self .nodes [0 ].getrawmempool ()
296296
297297 # Now try combining confirmed and unconfirmed inputs
298298 tx5 = test_nonzero_locks (tx4 , self .nodes [0 ], self .relayfee , use_height_lock = True )
299- assert tx5 .hash not in self .nodes [0 ].getrawmempool ()
299+ assert tx5 .txid_hex not in self .nodes [0 ].getrawmempool ()
300300
301301 utxo = self .wallet .get_utxo ()
302302 tx5 .vin .append (CTxIn (COutPoint (int (utxo ["txid" ], 16 ), utxo ["vout" ]), nSequence = 1 ))
@@ -315,8 +315,8 @@ def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock):
315315 # If we invalidate the tip, tx3 should get added to the mempool, causing
316316 # tx4 to be removed (fails sequence-lock).
317317 self .nodes [0 ].invalidateblock (self .nodes [0 ].getbestblockhash ())
318- assert tx4 .hash not in self .nodes [0 ].getrawmempool ()
319- assert tx3 .hash in self .nodes [0 ].getrawmempool ()
318+ assert tx4 .txid_hex not in self .nodes [0 ].getrawmempool ()
319+ assert tx3 .txid_hex in self .nodes [0 ].getrawmempool ()
320320
321321 # Now mine 2 empty blocks to reorg out the current tip (labeled tip-1 in
322322 # diagram above).
@@ -333,8 +333,8 @@ def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock):
333333 cur_time += 1
334334
335335 mempool = self .nodes [0 ].getrawmempool ()
336- assert tx3 .hash not in mempool
337- assert tx2 .hash in mempool
336+ assert tx3 .txid_hex not in mempool
337+ assert tx2 .txid_hex in mempool
338338
339339 # Reset the chain and get rid of the mocktimed-blocks
340340 self .nodes [0 ].setmocktime (0 )
0 commit comments