Skip to content

Commit

Permalink
Add oracles config check
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Feb 23, 2024
1 parent 5ed5454 commit 835f6c0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/common/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ async def update_oracles_cache() -> None:
async def get_oracles() -> Oracles:
await update_oracles_cache()

oracles_cache = cast(OraclesCache, _oracles_cache)
if _oracles_cache is None:
raise RuntimeError('Can not fetch oracles config. Is your execution node fully synced?')

config = oracles_cache.config
rewards_threshold = oracles_cache.rewards_threshold
validators_threshold = oracles_cache.validators_threshold
config = _oracles_cache.config
rewards_threshold = _oracles_cache.rewards_threshold
validators_threshold = _oracles_cache.validators_threshold

endpoints = []
public_keys = []
Expand Down

0 comments on commit 835f6c0

Please sign in to comment.