Skip to content

Commit c090886

Browse files
committed
v0.2.5 not retrying ForkedBlock exceptions in get_logs wrapper
1 parent d5b1e8c commit c090886

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

IceCreamSwapWeb3/EthAdvanced.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ def get_logs(
290290
p_bar.update(num_blocks)
291291
return events
292292
except Exception as e:
293+
if isinstance(e, ForkedBlock):
294+
raise
293295
# split the filter range and try again
294296
print(f"eth_getLogs between block {from_block} and {to_block} returned {repr(e)}, splitting and retrying")
295297
mid_block = (from_block + to_block) // 2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
VERSION = '0.2.4'
3+
VERSION = '0.2.5'
44
DESCRIPTION = 'IceCreamSwap Web3.py wrapper'
55
LONG_DESCRIPTION = 'IceCreamSwap Web3.py wrapper with automatic retries, multicall and other advanced functionality'
66

0 commit comments

Comments
 (0)