Skip to content

Commit

Permalink
added todos to remove the rule on at most filling one day
Browse files Browse the repository at this point in the history
  • Loading branch information
fhenneke committed Oct 4, 2024
1 parent ddf1d66 commit 64270cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transaction_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def get_start_block(self) -> int:
"""
Retrieve the most recent block X already present in raw_token_imbalances table,
and return block X+1 as start_block.
If block X is from more than 1 day ago, a recent finalized block is returned.
TODO: Remove that rule before moving to production.
If no entries are present, fallback to get_finalized_block_number().
"""
try:
Expand All @@ -57,6 +60,7 @@ def get_start_block(self) -> int:
if max_block > blockchain_latest_block - 7200:
return max_block + 1
else:
# TODO: Remove this rule before moving to production.
return blockchain_latest_block
except Exception as e:
logger.error("Error fetching start block from database: %s", e)
Expand Down

0 comments on commit 64270cd

Please sign in to comment.