Skip to content

Commit 8c0fa83

Browse files
committed
increased unstable blocks from 2 to 3 and made it configurable per env variable
1 parent a6a5ddb commit 8c0fa83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IceCreamSwapWeb3/Web3Advanced.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from importlib.resources import files
23

34
from eth_utils import to_checksum_address
@@ -35,7 +36,7 @@ def __init__(
3536
self,
3637
node_url: str,
3738
should_retry: bool = True,
38-
unstable_blocks: int = 2, # not all nodes might have latest n blocks, these are seen as unstable
39+
unstable_blocks: int = int(os.getenv("UNSTABLE_BLOCKS", 3)), # not all nodes might have latest n blocks, these are seen as unstable
3940
):
4041
patch_error_formatters()
4142
self.node_url = node_url

0 commit comments

Comments
 (0)