Skip to content

Commit

Permalink
feat: fix mining early quorums on early blocks with no troubles!
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Jan 2, 2025
1 parent ed1ad8e commit 7f7c974
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/functional/feature_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def run_test(self):
self.log.info("Check 1st superblock before v20")
self.bump_mocktime(3)
self.generate(self.nodes[0], 3, sync_fun=self.sync_blocks())
assert_equal(self.nodes[0].getblockcount(), 130)
assert_equal(self.nodes[0].getblockcount(), 137)
assert_equal(self.nodes[0].getblockchaininfo()["softforks"]["v20"]["active"], False)
self.check_superblockbudget(False)

self.log.info("Check 2nd superblock before v20")
self.bump_mocktime(10)
self.generate(self.nodes[0], 10, sync_fun=self.sync_blocks())
self.bump_mocktime(3)
self.generate(self.nodes[0], 3, sync_fun=self.sync_blocks())
assert_equal(self.nodes[0].getblockcount(), 140)
assert_equal(self.nodes[0].getblockchaininfo()["softforks"]["v20"]["active"], False)
self.check_superblockbudget(False)
Expand Down
5 changes: 3 additions & 2 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,9 @@ def setup_network(self):

self.start_masternodes()

self.bump_mocktime(1)
self.generate(self.nodes[0], 1)
# it should be at least 8 blocks since v20 when MN can be used in quorums
self.bump_mocktime(8)
self.generate(self.nodes[0], 8)
for i in range(1, num_simple_nodes):
force_finish_mnsync(self.nodes[i])

Expand Down

0 comments on commit 7f7c974

Please sign in to comment.