From 2ec4e559bf74effcde393ca30e17eafc91656ec3 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 12 Feb 2024 22:19:25 +0300 Subject: [PATCH] refactor: apply suggestions Co-authored-by: Konstantin Akimov --- test/functional/feature_governance.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/functional/feature_governance.py b/test/functional/feature_governance.py index 0f366651ee86b..7856d3a63c317 100755 --- a/test/functional/feature_governance.py +++ b/test/functional/feature_governance.py @@ -81,11 +81,10 @@ def have_trigger_for_height(self, sb_block_height): count = 0 for node in self.nodes: valid_triggers = node.gobject("list", "valid", "triggers") - valid_triggers_list = list(valid_triggers.values()) - for i in range(len(valid_triggers)): - if json.loads(valid_triggers_list[i]["DataString"])["event_block_height"] != sb_block_height: + for trigger in list(valid_triggers.values()): + if json.loads(trigger["DataString"])["event_block_height"] != sb_block_height: continue - if valid_triggers_list[i]['AbsoluteYesCount'] > 0: + if trigger['AbsoluteYesCount'] > 0: count = count + 1 break return count == len(self.nodes)