From 05e9191599205ec1f8f7a776c54b690a197d0ecf Mon Sep 17 00:00:00 2001 From: harisang Date: Sat, 23 Nov 2024 04:10:13 +0200 Subject: [PATCH] mypy fix --- src/sync/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sync/common.py b/src/sync/common.py index 020be20..5147add 100644 --- a/src/sync/common.py +++ b/src/sync/common.py @@ -40,7 +40,7 @@ def find_block_with_timestamp(node: Web3, time_stamp: float) -> int: This implements binary search and returns the smallest block number whose timestamp is at least as large as the time_stamp argument passed in the function """ - end_block_number = node.eth.get_block("finalized")["number"] + end_block_number = int(node.eth.get_block("finalized")["number"]) start_block_number = 1 close_in_seconds = 30 @@ -83,7 +83,7 @@ def compute_block_and_month_range( # pylint: disable=too-many-locals latest_finalized_block = node.eth.get_block("finalized") - current_month_end_block = latest_finalized_block["number"] + current_month_end_block = int(latest_finalized_block["number"]) current_month_end_timestamp = latest_finalized_block["timestamp"] current_month_end_datetime = datetime.fromtimestamp(