From 64270cd3fc4e0388ef0242ef14e226728b205581 Mon Sep 17 00:00:00 2001 From: Felix Henneke Date: Fri, 4 Oct 2024 11:01:33 +0200 Subject: [PATCH] added todos to remove the rule on at most filling one day --- src/transaction_processor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/transaction_processor.py b/src/transaction_processor.py index 7ac2a97..c695b92 100644 --- a/src/transaction_processor.py +++ b/src/transaction_processor.py @@ -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: @@ -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)