Skip to content

Commit 2f1d59e

Browse files
Merge #7252: test: fix wait_for_instantlock calls in test_instantsend_after_restart
c885b55 test: fix wait_for_instantlock calls in test_instantsend_after_restart (PastaClaw) Pull request description: ## Summary Fix two broken `wait_for_instantlock` call sites in `test_instantsend_after_restart` that were missed during the merge of #7240 and #7241. ## Problem The merge of #7240 (added `test_instantsend_after_restart` with old-style calls) and #7241 (refactored `wait_for_instantlock(txid, node)` → `wait_for_instantlock(*txids, nodes=None)`) left two call sites using the old positional signature: ```python for node in self.nodes: self.wait_for_instantlock(txid, node) # node consumed as second *txid ``` The `node` object gets silently swallowed into `*txids` as a second "txid", causing `getrawtransaction(node_object, True)` to fail and the wait to time out after ~282 seconds. This breaks `p2p_instantsend.py` on every CI run. ## Fix Replace both loops with the new consolidated API which handles mempool sync and checks all nodes by default: ```python self.wait_for_instantlock(txid) ``` ACKs for top commit: PastaPastaPasta: ACK c885b55 Tree-SHA512: d53c39491ba67697ece0f00393407a1fdc1d87e3bd495d4370c23491f9acef26c8a57bc9085ac007b994adf7903f89fa65e0962f5cbd71b32d4a8dfa2af45d81
2 parents 3957e09 + c885b55 commit 2f1d59e

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

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)