File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 36
36
37
37
38
38
def get_web3 (config ) -> Web3 :
39
- web3 = Web3 (Web3 .HTTPProvider (config .ethereum .api_url .value ))
39
+ web3 = Web3 (Web3 .HTTPProvider (config .ethereum .api_url .value , request_kwargs = { 'timeout' : config . ethereum . client_timeout } ))
40
40
if config .ethereum .chain_id .value == 4 : # rinkeby
41
41
web3 .middleware_onion .inject (geth_poa_middleware , layer = 0 )
42
42
web3 .middleware_onion .add (local_filter_middleware )
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ def get_defaults():
122
122
"max_gas_price" : 150000000000 ,
123
123
# Authorized publishers for sync events.
124
124
"authorized_emitters" : ["0x23eC28598DCeB2f7082Cc3a9D670592DfEd6e0dC" ],
125
+ # http client timeout, default 60s
126
+ "client_timeout" : 60
125
127
},
126
128
"tezos" : {
127
129
# Whether to fetch transactions from Tezos.
You can’t perform that action at this time.
0 commit comments