Skip to content

Commit

Permalink
Handle exception for validator get too
Browse files Browse the repository at this point in the history
  • Loading branch information
badrogger committed Apr 16, 2020
1 parent 6051ed0 commit 0617262
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skale/contracts/delegation/validator_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def is_main_address(self, validator_address: str) -> bool:
try:
# TODO: handle address that is not main in a proper way
validator_id = self.validator_id_by_address(validator_address)
validator = self.get(validator_id)
except Exception:
validator_id = 0
return False

validator = self.get(validator_id)
return validator_address == validator['validator_address']

def validator_address_exists(self, validator_address: str) -> bool:
Expand Down

0 comments on commit 0617262

Please sign in to comment.