Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Nov 21, 2024
1 parent fc2c654 commit 2b6b5e6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/sync/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ def find_block_with_timestamp(node, time_stamp):
return block.number


def compute_block_range_from_timestamps(node, start_timestamp, end_timestamp):
start_block = find_block_with_timestamp(node, start_timestamp)
end_block = find_block_with_timestamp(node, end_timestamp)
if node.eth.get_block(end_block).timestamp > end_timestamp:
end_block = end_block - 1
return start_block, end_block


def compute_block_and_month_range(node: Web3):
# We first compute the relevant block range
# Here, we assume that the job runs at least once every 24h
Expand Down

0 comments on commit 2b6b5e6

Please sign in to comment.