Skip to content

Commit

Permalink
fix: bump time for all nodes during mine_quorum in feature_llmq_rotat…
Browse files Browse the repository at this point in the history
…ion.py test
  • Loading branch information
knst committed Dec 9, 2024
1 parent efd4701 commit cf84dff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/functional/feature_llmq_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def move_to_next_cycle(self):
# move forward to next DKG
skip_count = cycle_length - (cur_block % cycle_length)
if skip_count != 0:
self.bump_mocktime(1, nodes=nodes)
self.bump_mocktime(1)
self.generate(self.nodes[0], skip_count, sync_fun=self.no_op)
self.sync_blocks(nodes)
self.log.info('Moved from block %d to %d' % (cur_block, self.nodes[0].getblockcount()))
Expand Down
18 changes: 9 additions & 9 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1836,17 +1836,17 @@ def mine_quorum(self, llmq_type_name="llmq_test", llmq_type=100, expected_connec
# move forward to next DKG
skip_count = 24 - (self.nodes[0].getblockcount() % 24)
if skip_count != 0:
self.bump_mocktime(1, nodes=nodes)
self.bump_mocktime(1)
self.generate(self.nodes[0], skip_count, sync_fun=self.no_op)
self.sync_blocks(nodes)

q = self.nodes[0].getbestblockhash()
self.log.info("Expected quorum_hash:"+str(q))
self.log.info("Waiting for phase 1 (init)")
self.wait_for_quorum_phase(q, 1, expected_members, None, 0, mninfos_online, llmq_type_name=llmq_type_name)
self.wait_for_quorum_connections(q, expected_connections, mninfos_online, wait_proc=lambda: self.bump_mocktime(1, nodes=nodes), llmq_type_name=llmq_type_name)
self.wait_for_quorum_connections(q, expected_connections, mninfos_online, wait_proc=lambda: self.bump_mocktime(1), llmq_type_name=llmq_type_name)
if spork23_active:
self.wait_for_masternode_probes(q, mninfos_online, wait_proc=lambda: self.bump_mocktime(1, nodes=nodes))
self.wait_for_masternode_probes(q, mninfos_online, wait_proc=lambda: self.bump_mocktime(1))

self.move_blocks(nodes, 2)

Expand Down Expand Up @@ -1877,7 +1877,7 @@ def mine_quorum(self, llmq_type_name="llmq_test", llmq_type=100, expected_connec
self.wait_for_quorum_commitment(q, nodes, llmq_type=llmq_type)

self.log.info("Mining final commitment")
self.bump_mocktime(1, nodes=nodes)
self.bump_mocktime(1)
self.nodes[0].getblocktemplate() # this calls CreateNewBlock
self.generate(self.nodes[0], 1, sync_fun=lambda: self.sync_blocks(nodes))

Expand Down Expand Up @@ -1928,9 +1928,9 @@ def mine_cycle_quorum(self, is_first=True):
self.log.info("quorumIndex 0: Waiting for phase 1 (init)")
self.wait_for_quorum_phase(q_0, 1, expected_members, None, 0, mninfos_online, llmq_type_name)
self.log.info("quorumIndex 0: Waiting for quorum connections (init)")
self.wait_for_quorum_connections(q_0, expected_connections, mninfos_online, llmq_type_name, wait_proc=lambda: self.bump_mocktime(1, nodes=nodes))
self.wait_for_quorum_connections(q_0, expected_connections, mninfos_online, llmq_type_name, wait_proc=lambda: self.bump_mocktime(1))
if spork23_active:
self.wait_for_masternode_probes(q_0, mninfos_online, wait_proc=lambda: self.bump_mocktime(1, nodes=nodes), llmq_type_name=llmq_type_name)
self.wait_for_masternode_probes(q_0, mninfos_online, wait_proc=lambda: self.bump_mocktime(1), llmq_type_name=llmq_type_name)

self.move_blocks(nodes, 1)

Expand All @@ -1940,9 +1940,9 @@ def mine_cycle_quorum(self, is_first=True):
self.log.info("quorumIndex 1: Waiting for phase 1 (init)")
self.wait_for_quorum_phase(q_1, 1, expected_members, None, 0, mninfos_online, llmq_type_name)
self.log.info("quorumIndex 1: Waiting for quorum connections (init)")
self.wait_for_quorum_connections(q_1, expected_connections, mninfos_online, llmq_type_name, wait_proc=lambda: self.bump_mocktime(1, nodes=nodes))
self.wait_for_quorum_connections(q_1, expected_connections, mninfos_online, llmq_type_name, wait_proc=lambda: self.bump_mocktime(1))
if spork23_active:
self.wait_for_masternode_probes(q_1, mninfos_online, wait_proc=lambda: self.bump_mocktime(1, nodes=nodes), llmq_type_name=llmq_type_name)
self.wait_for_masternode_probes(q_1, mninfos_online, wait_proc=lambda: self.bump_mocktime(1), llmq_type_name=llmq_type_name)

self.move_blocks(nodes, 1)

Expand Down Expand Up @@ -1994,7 +1994,7 @@ def mine_cycle_quorum(self, is_first=True):
self.log.info("quorumIndex 1: Waiting for phase 6 (finalization)")
self.wait_for_quorum_phase(q_1, 6, expected_members, None, 0, mninfos_online, llmq_type_name)
self.log.info("Mining final commitments")
self.bump_mocktime(1, nodes=nodes)
self.bump_mocktime(1)
self.nodes[0].getblocktemplate() # this calls CreateNewBlock
self.generate(self.nodes[0], 1, sync_fun=lambda: self.sync_blocks(nodes))

Expand Down

0 comments on commit cf84dff

Please sign in to comment.