Skip to content

Commit 66acbae

Browse files
committed
v0.1.55 logging eth_getLogs errors even when splitting and retrying
1 parent e9b0409 commit 66acbae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

IceCreamSwapWeb3/EthAdvanced.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ def get_logs(
271271
if p_bar is not None:
272272
p_bar.update(num_blocks)
273273
return events
274-
except Exception:
274+
except Exception as e:
275275
# split the filter range and try again
276+
print(f"eth_getLogs between block {from_block} and {to_block} returned {repr(e)}, splitting and retrying")
276277
mid_block = (from_block + to_block) // 2
277278
left_filter = {**filter_params, "toBlock": mid_block}
278279
right_filter = {**filter_params, "fromBlock": mid_block + 1}

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.1.54'
3+
VERSION = '0.1.55'
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)