gnosis/eth/ethereum_client.py
def _prepare_http_session(self) -> requests.Session:
        """
        Prepare http session with custom pooling. See:
        https://urllib3.readthedocs.io/en/stable/advanced-usage.html
        https://2.python-requests.org/en/latest/api/#requests.adapters.HTTPAdapter
        https://web3py.readthedocs.io/en/stable/providers.html#httpprovider
        """
        session = requests.Session()
        adapter = requests.adapters.HTTPAdapter(
            pool_connections=1,  # Doing all the connections to the same url
            pool_maxsize=100,  # Number of concurrent connections
            max_retries=3,  # Nodes are not very responsive some times
            pool_block=False,
        )
        session.mount("http://", adapter)
        session.mount("https://", adapter)
        return session

        Prepare http session with custom pooling. See:
        https://urllib3.readthedocs.io/en/stable/advanced-usage.html
        https://2.python-requests.org/en/latest/api/#requests.adapters.HTTPAdapter
        https://web3py.readthedocs.io/en/stable/providers.html#httpprovider
        
Prepare http session with custom pooling.
Prepare http session with custom pooling .
def _prepare_http_session(self) -> requests.Session:
        session = requests.Session()
        adapter = requests.adapters.HTTPAdapter(
            pool_connections=1,  
            pool_maxsize=100,  
            max_retries=3,  
            pool_block=False,
        )
        session.mount("http://", adapter)
        session.mount("https://", adapter)
        return session
def _prepare_http_session ( self ) -> requests . Session : session = requests . Session ( ) adapter = requests . adapters . HTTPAdapter ( pool_connections = 1 , pool_maxsize = 100 , max_retries = 3 , pool_block = False , ) session . mount ( "http://" , adapter ) session . mount ( "https://" , adapter ) return session
Prepare http session with custom pooling.
Prepare http session with custom pooling .
"""
        Prepare http session with custom pooling. See:
        https://urllib3.readthedocs.io/en/stable/advanced-usage.html
        https://2.python-requests.org/en/latest/api/#requests.adapters.HTTPAdapter
        https://web3py.readthedocs.io/en/stable/providers.html#httpprovider
        """ # Doing all the connections to the same url # Number of concurrent connections # Nodes are not very responsive some times
self