From 411b4d0ea6bd6d4becfe74057f786e5ceefeb3ac Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 1 Aug 2024 16:15:55 +0300 Subject: [PATCH] hardcode start block --- src/daemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/daemon.py b/src/daemon.py index bcae2bd..44017af 100644 --- a/src/daemon.py +++ b/src/daemon.py @@ -1,6 +1,7 @@ """ Running this daemon computes raw imbalances for finalized blocks by calling imbalances_script.py. """ + import os import time from typing import List, Tuple @@ -207,8 +208,10 @@ def process_transactions(chain_name: str) -> None: solver_slippage_db_connection, ) = initialize_connections() rt = RawTokenImbalances(web3, chain_name) - # start_block = get_start_block(web3, chain_name, solver_slippage_db_connection) - start_block = 20419429 + start_block = get_start_block(web3, chain_name, solver_slippage_db_connection) + ## this is just saying that the start block should be hardcoded in case the script restarts a few hours after that specific block + if start_block - 12000 < 20420000: + start_block = 20420000 previous_block = start_block unprocessed_txs: List[Tuple[str, int, int]] = []