Skip to content

Commit c885b55

Browse files
committed
test: fix wait_for_instantlock calls in test_instantsend_after_restart
The merge of dashpay#7240 and dashpay#7241 left two call sites in test_instantsend_after_restart using the old positional signature wait_for_instantlock(txid, node). After dashpay#7241 changed the signature to *txids with keyword-only nodes=, the node object was silently consumed as a second txid, causing the wait to always time out. Use the new consolidated API which handles mempool sync and checks all nodes by default.
1 parent 3957e09 commit c885b55

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/functional/p2p_instantsend.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,7 @@ def test_instantsend_after_restart(self):
139139
receiver = self.nodes[self.receiver_idx]
140140
sender_addr = sender.getnewaddress()
141141
fund_id = self.nodes[0].sendtoaddress(sender_addr, 1)
142-
self.bump_mocktime(30)
143-
self.sync_mempools()
144-
for node in self.nodes:
145-
self.wait_for_instantlock(fund_id, node)
142+
self.wait_for_instantlock(fund_id)
146143
tip = self.generate(self.nodes[0], 2)[-1]
147144
self.bump_mocktime(30)
148145
self.wait_for_chainlocked_block_all_nodes(tip)
@@ -199,10 +196,7 @@ def check_mn_peers(node=mn_node, my_hash=mn_info.proTxHash):
199196

200197
# send a TX — needs IS lock from all restarted MNs, no new blocks mined
201198
is_id = sender.sendtoaddress(receiver_addr, 0.5)
202-
self.bump_mocktime(30)
203-
self.sync_mempools()
204-
for node in self.nodes:
205-
self.wait_for_instantlock(is_id, node)
199+
self.wait_for_instantlock(is_id)
206200
self.log.info("InstantSend lock succeeded after full restart")
207201

208202
# clean up

0 commit comments

Comments
 (0)