File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -112,18 +112,19 @@ def _find_max_filter_range(self) -> int:
112
112
return 0
113
113
114
114
def _find_max_batch_size (self ) -> int :
115
- for batch_size in self .BATCH_SIZES_TO_TRY :
116
- try :
115
+ working_size = 0
116
+ try :
117
+ for batch_size in reversed (self .BATCH_SIZES_TO_TRY ):
117
118
with self .batch_requests () as batch :
118
119
for _ in range (batch_size ):
119
120
batch .add (self .eth ._gas_price ())
120
121
result = batch .execute ()
121
122
assert len (result ) == batch_size
122
- return batch_size
123
- except Exception :
123
+ working_size = batch_size
124
124
sleep (0.1 )
125
- print (f"Can not use batch requests with RPC { self .node_url } " )
126
- return 0
125
+ except Exception :
126
+ pass
127
+ return working_size
127
128
128
129
def _check_revert_reason_available (self ):
129
130
with files ("IceCreamSwapWeb3" ).joinpath ("./abi/RevertTester.abi" ).open ('r' ) as f :
You can’t perform that action at this time.
0 commit comments