Skip to content

Commit

Permalink
Merge pull request #542 from skalenetwork/add-is-node-broadcasted
Browse files Browse the repository at this point in the history
Add is node broadcasted
  • Loading branch information
badrogger committed Oct 20, 2023
2 parents e3451f6 + 229ca13 commit 7c03914
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* @dmitry-tk @kladkogex @badrogger
* @dmytrotkk @kladkogex @badrogger
*.md @skalenetwork/docowners
3 changes: 3 additions & 0 deletions skale/contracts/manager/dkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ def get_complaint_data(self, group_index):

def get_time_of_last_successful_dkg(self, group_index):
return self.contract.functions.getTimeOfLastSuccessfulDKG(group_index).call()

def is_node_broadcasted(self, group_index: int, node_id: int) -> bool:
return self.contract.functions.isNodeBroadcasted(group_index, node_id).call()
2 changes: 2 additions & 0 deletions tests/rotation_history/rotation_history_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ def test_rotation_history_failed_dkg(
):
nodes, skale_instances, name = four_node_schain
group_index = skale.web3.keccak(text=name)
assert not skale.dkg.is_node_broadcasted(group_index, nodes[0]['node_id'])

run_dkg(nodes, skale_instances, group_index)
assert skale.dkg.is_node_broadcasted(group_index, nodes[0]['node_id'])

group_ids_0 = skale.schains_internal.get_node_ids_for_schain(name)

Expand Down

0 comments on commit 7c03914

Please sign in to comment.