Skip to content

Commit bc5c4f7

Browse files
committed
v0.1.51 hopefully improved handling of empty block responses
1 parent 790977a commit bc5c4f7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

IceCreamSwapWeb3/BatchRetryMiddleware.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def request_wrapper(method, params):
2828
response = make_batch_request.__self__.make_request(method, params)
2929
if "error" in response and self._w3.should_retry:
3030
raise Exception(response["error"].get("message") or "Unknown RPC Error")
31+
if ("eth_getBlockBy" in method and response.get("result") in NULL_RESPONSES) and self._w3.should_retry:
32+
raise Exception("Block not found")
3133
return response
3234

3335
return [

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.50'
3+
VERSION = '0.1.51'
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)