Skip to content

Commit 6b589b3

Browse files
simone1999pacrob
authored andcommitted
somewhat fixed Batching concurrency capabilities
1 parent d7aac66 commit 6b589b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web3/providers/base.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ def is_connected(self, show_traceback: bool = False) -> bool:
116116
class JSONBaseProvider(BaseProvider):
117117
logger = logging.getLogger("web3.providers.base.JSONBaseProvider")
118118

119-
_is_batching: bool = False
120-
_batch_request_func_cache: Tuple[
121-
Tuple[Middleware, ...], Callable[..., Union[List[RPCResponse], RPCResponse]]
122-
] = (None, None)
123-
124119
def __init__(self, **kwargs: Any) -> None:
125120
super().__init__(**kwargs)
126121
self.request_counter = itertools.count()
127122

123+
self._is_batching: bool = False
124+
self._batch_request_func_cache: Tuple[
125+
Tuple[Middleware, ...], Callable[..., Union[List[RPCResponse], RPCResponse]]
126+
] = (None, None)
127+
128128
def encode_rpc_request(self, method: RPCEndpoint, params: Any) -> bytes:
129129
rpc_dict = {
130130
"jsonrpc": "2.0",

0 commit comments

Comments
 (0)