Skip to content

Commit

Permalink
fix: error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
platonfloria committed May 21, 2024
1 parent fe12daa commit 39756f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions fastlane_bot/events/event_gatherer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import traceback
from itertools import chain
from typing import Dict, List

Expand Down Expand Up @@ -96,5 +95,5 @@ async def _get_logs_recursive(self, from_block: int, to_block: int, topics: List
)
return [log for log_list in log_lists for log in log_list]
else:
traceback.print_exc(e)
return []
raise e
raise Exception(f"Illegal log query range: {from_block} -> {to_block}")
5 changes: 2 additions & 3 deletions run_blockchain_terraformer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import math
import traceback
from typing import Tuple, List, Dict

import pandas as pd
Expand Down Expand Up @@ -687,8 +686,8 @@ def get_events_recursive(get_logs: any, start_block: int, end_block: int) -> lis
event_list_2 = get_events_recursive(get_logs, mid_block + 1, end_block)
return event_list_1 + event_list_2
else:
traceback.print_exc(e)
return []
raise e
raise Exception(f"Illegal log query range: {start_block} -> {end_block}")


def get_uni_v3_pools(
Expand Down

0 comments on commit 39756f1

Please sign in to comment.