Skip to content

Commit 83ec7f2

Browse files
knstUdjinM6
andauthored
fix: intermittent failure in feature_llmq_simplepose.py (dashpay#5859)
## Issue being fixed or feature implemented kudos to kwvg to report issue: he pointed out that functional tests randomly fail lately. Bisect pointed out an exact commit: bitcoin#20027 - mockable time everywhere ## What was done? Added call `mn.node.mockscheduler` as it is done in 20027 for other functional tests ## How Has This Been Tested? Run 20 times. Without this patch 20% failures; with this patch - zero failures. ``` test/functional/test_runner.py -j20 feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py feature_llmq_simplepose.py ``` ## Breaking Changes N/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone --------- Co-authored-by: UdjinM6 <[email protected]>
1 parent 9c38b35 commit 83ec7f2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/functional/feature_llmq_simplepose.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,21 +189,24 @@ def repair_masternodes(self, restart):
189189
addr = self.nodes[0].getnewaddress()
190190
self.nodes[0].sendtoaddress(addr, 0.1)
191191
self.nodes[0].protx('update_service', mn.proTxHash, '127.0.0.1:%d' % p2p_port(mn.node.index), mn.keyOperator, "", addr)
192-
# Make sure this tx "safe" to mine even when InstantSend and ChainLocks are no longer functional
193-
self.bump_mocktime(60 * 10 + 1)
194-
self.nodes[0].generate(1)
195-
assert not self.check_banned(mn)
196-
197192
if restart:
198193
self.stop_node(mn.node.index)
199194
self.start_masternode(mn)
200195
else:
201196
mn.node.setnetworkactive(True)
202197
self.connect_nodes(mn.node.index, 0)
198+
199+
# syncing blocks only since node 0 has txes waiting to be mined
200+
self.sync_blocks()
201+
202+
# Make sure protxes are "safe" to mine even when InstantSend and ChainLocks are no longer functional
203+
self.bump_mocktime(60 * 10 + 1)
204+
self.nodes[0].generate(1)
203205
self.sync_all()
204206

205207
# Isolate and re-connect all MNs (otherwise there might be open connections with no MNAUTH for MNs which were banned before)
206208
for mn in self.mninfo:
209+
assert not self.check_banned(mn)
207210
mn.node.setnetworkactive(False)
208211
self.wait_until(lambda: mn.node.getconnectioncount() == 0)
209212
mn.node.setnetworkactive(True)

0 commit comments

Comments
 (0)