|
16 | 16 | from test_framework.test_framework import DashTestFramework |
17 | 17 | from test_framework.util import assert_equal, assert_raises_rpc_error, force_finish_mnsync |
18 | 18 |
|
| 19 | +import time |
19 | 20 |
|
20 | 21 | class LLMQChainLocksTest(DashTestFramework): |
21 | 22 | def set_test_params(self): |
22 | 23 | self.set_dash_test_params(5, 4) |
23 | 24 | self.delay_v20_and_mn_rr(height=200) |
24 | 25 |
|
| 26 | + def sleep_and_assert_no_cl(self, block_hash): |
| 27 | + time.sleep(5) |
| 28 | + |
| 29 | + for node in self.nodes: |
| 30 | + self.log.info(f"Expecting no ChainLock for {block_hash}") |
| 31 | + block = node.getblock(block_hash) |
| 32 | + #assert_equal(block["confirmations"], 0) |
| 33 | + assert not block["chainlock"] |
| 34 | + |
25 | 35 | def run_test(self): |
26 | 36 | # Connect all nodes to node1 so that we always have the whole network connected |
27 | 37 | # Otherwise only masternode connections will be established between nodes, which won't propagate TXs/blocks |
@@ -84,7 +94,7 @@ def run_test(self): |
84 | 94 | previous_block_hash = self.nodes[0].getbestblockhash() |
85 | 95 | for _ in range(2): |
86 | 96 | block_hash = self.generate(self.nodes[0], 1, sync_fun=self.no_op)[0] |
87 | | - self.wait_for_chainlocked_block_all_nodes(block_hash, timeout=5, expected=False) |
| 97 | + self.sleep_and_assert_no_cl(block_hash) |
88 | 98 | assert self.nodes[0].getblock(previous_block_hash)["chainlock"] |
89 | 99 |
|
90 | 100 | self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 0) |
|
0 commit comments