Skip to content

Commit

Permalink
moved rotation and added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed Oct 31, 2023
1 parent babb0c2 commit 7fe4720
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions test/functional/feature_llmq_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,29 @@ def run_test(self):

self.check_reconnects(4)

self.nodes[0].sporkupdate("SPORK_23_QUORUM_POSE", 4070908800)
self.wait_for_sporks_same()

self.activate_v19(expected_activation_height=900)
self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount()))
self.move_to_next_cycle()
self.log.info("Cycle H height:" + str(self.nodes[0].getblockcount()))
self.move_to_next_cycle()
self.log.info("Cycle H+C height:" + str(self.nodes[0].getblockcount()))
self.move_to_next_cycle()
self.log.info("Cycle H+2C height:" + str(self.nodes[0].getblockcount()))
self.mine_cycle_quorum(llmq_type_name='llmq_test_dip0024', llmq_type=103)

# Since we IS quorums are mined only using dip24 (rotation) we need to enable rotation, and continue tests on llmq_test_dip0024 for connections.

self.log.info("check that old masternode conections are dropped")
removed = False
for mn in self.mninfo:
if len(mn.node.quorum("memberof", mn.proTxHash)) > 0:
try:
with mn.node.assert_debug_log(['removing masternodes quorum connections']):
with mn.node.assert_debug_log(['keeping mn quorum connections']):
self.mine_quorum()
self.mine_cycle_quorum(llmq_type_name='llmq_test_dip0024', llmq_type=103)
mn.node.mockscheduler(60) # we check for old connections via the scheduler every 60 seconds
removed = True
except:
Expand All @@ -87,19 +102,6 @@ def run_test(self):
break
assert removed # no way we removed none

self.nodes[0].sporkupdate("SPORK_23_QUORUM_POSE", 4070908800)
self.wait_for_sporks_same()

self.activate_v19(expected_activation_height=900)
self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount()))
self.move_to_next_cycle()
self.log.info("Cycle H height:" + str(self.nodes[0].getblockcount()))
self.move_to_next_cycle()
self.log.info("Cycle H+C height:" + str(self.nodes[0].getblockcount()))
self.move_to_next_cycle()
self.log.info("Cycle H+2C height:" + str(self.nodes[0].getblockcount()))
self.mine_cycle_quorum(llmq_type_name='llmq_test_dip0024', llmq_type=103)

self.log.info("check that inter-quorum masternode conections are added")
added = False
for mn in self.mninfo:
Expand Down

0 comments on commit 7fe4720

Please sign in to comment.