Skip to content

Commit ffcc7d8

Browse files
committed
only retry unknown blocks 3 times, then raise to prevent infinite retries on forked out blocks requested by block hash
1 parent 25925fd commit ffcc7d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

IceCreamSwapWeb3/EthAdvanced.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ def inner(*args, no_retry: bool = False, **kwargs):
3939
except Exception as e:
4040
if isinstance(e, ContractLogicError):
4141
raise
42+
if "unknown block" in str(e) and retries >= 3:
43+
raise
4244
if retries == 0:
4345
wait_for = 0
4446
elif retries < 6:

0 commit comments

Comments
 (0)