Skip to content

Commit

Permalink
test: add activate_ehf_by_name
Browse files Browse the repository at this point in the history
To avoid copy and pasting future ehf deployments activation functions
  • Loading branch information
panleone committed Jan 30, 2024
1 parent d101bf5 commit 0fc3599
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,19 +1135,23 @@ def activate_v19(self, expected_activation_height=None):
def activate_v20(self, expected_activation_height=None):
self.activate_by_name('v20', expected_activation_height)

def activate_mn_rr(self, expected_activation_height=None):
def activate_ehf_by_name(self, name, expected_activation_height=None):
self.nodes[0].sporkupdate("SPORK_24_TEST_EHF", 0)
self.wait_for_sporks_same()
mn_rr_height = 0
while mn_rr_height == 0:
assert get_bip9_details(self.nodes[0], name)['ehf']
ehf_height = 0
while ehf_height == 0:
time.sleep(1)
try:
mn_rr_height = get_bip9_details(self.nodes[0], 'mn_rr')['ehf_height']
ehf_height = get_bip9_details(self.nodes[0], name)['ehf_height']
except KeyError:
pass
self.nodes[0].generate(1)
self.sync_all()
self.activate_by_name('mn_rr', expected_activation_height)
self.activate_by_name(name, expected_activation_height)

def activate_mn_rr(self, expected_activation_height=None):
self.activate_ehf_by_name('mn_rr', expected_activation_height)

def set_dash_llmq_test_params(self, llmq_size, llmq_threshold):
self.llmq_size = llmq_size
Expand Down

0 comments on commit 0fc3599

Please sign in to comment.