Skip to content

Commit

Permalink
Merge pull request #166 from skalenetwork/enhancement/SKALE-2554-is-g…
Browse files Browse the repository at this point in the history
…roup-failed-dkg

SKALE-2554 IsGroupFailedDkg wrapper
  • Loading branch information
dmytrotkk authored May 8, 2020
2 parents ee8b1e6 + a59e952 commit c88e401
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions skale/contracts/data/schains_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def get_schains_number(self):
def get_groups_public_key(self, group_index):
return self.contract.functions.getGroupsPublicKey(group_index).call()

def is_group_failed_dkg(self, group_index):
return self.contract.functions.isGroupFailedDKG(group_index).call()

def schain_active(self, schain):
if schain['name'] != '' and \
schain['owner'] != '0x0000000000000000000000000000000000000000':
Expand Down
9 changes: 9 additions & 0 deletions tests/contracts/data/schains_data_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,12 @@ def test_get_all_schains_ids(skale):

def test_get_schains_number(skale):
assert skale.schains_data.get_schains_number() == 1


def test_is_group_failed_dkg(skale):
assert skale.schains_data.is_group_failed_dkg(DEFAULT_SCHAIN_ID)


def test_get_group_public_key(skale):
assert skale.schains_data.get_groups_public_key(
DEFAULT_SCHAIN_ID) == [0, 0, 0, 0]

0 comments on commit c88e401

Please sign in to comment.