Skip to content

Commit

Permalink
Increase intervals. Improve consensus error text (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyc60 authored Sep 27, 2022
1 parent 8f97f3f commit c03edd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions oracle/oracle/common/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ async def execute_gql_query(
if results.count(item) > majority:
result = item
majority = results.count(item)

else:
diff = item
if majority >= len(subgraph_urls) // 2 + 1:
return result
raise GraphqlConsensusError
raise GraphqlConsensusError(f"{diff} not equals to {result}")
4 changes: 2 additions & 2 deletions oracle/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
CONFIRMATION_BLOCKS: int = config("CONFIRMATION_BLOCKS", default=15, cast=int)

# oracle
ORACLE_PROCESS_INTERVAL = config("ORACLE_PROCESS_INTERVAL", default=10, cast=int)
ORACLE_PROCESS_INTERVAL = config("ORACLE_PROCESS_INTERVAL", default=15, cast=int)

IPFS_FETCH_ENDPOINTS = config(
"IPFS_FETCH_ENDPOINTS",
Expand Down Expand Up @@ -56,7 +56,7 @@
)

# keeper
KEEPER_PROCESS_INTERVAL = config("KEEPER_PROCESS_INTERVAL", default=10, cast=int)
KEEPER_PROCESS_INTERVAL = config("KEEPER_PROCESS_INTERVAL", default=60, cast=int)

TRANSACTION_TIMEOUT = config("TRANSACTION_TIMEOUT", default=900, cast=int)

Expand Down

0 comments on commit c03edd6

Please sign in to comment.