File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 contracts_precompiled_path ,
2424 get_contracts_deployment_info
2525)
26+ from raiden_common .blockchain .middleware import http_retry_with_backoff_middleware
2627from requests .exceptions import ConnectionError
2728from web3 import HTTPProvider , Web3
2829
@@ -109,7 +110,14 @@ def main(
109110 log .info ("Starting Raiden Metrics Server" )
110111 try :
111112 log .info (f'Starting Web3 client for node at { eth_rpc } ' )
112- web3 = Web3 (HTTPProvider (eth_rpc ))
113+ provider = HTTPProvider (eth_rpc )
114+
115+ # give web3 some time between retries before failing
116+ provider .middlewares .replace ( # type: ignore
117+ "http_retry_request" , http_retry_with_backoff_middleware
118+ )
119+
120+ web3 = Web3 (provider )
113121 except ConnectionError :
114122 log .error (
115123 'Can not connect to the Ethereum client. Please check that it is running and that '
Original file line number Diff line number Diff line change 1- raiden-common == 0.1.4
1+ raiden-common == 0.1.5
22
33Click
44
You can’t perform that action at this time.
0 commit comments