From 729fdebacce1e3adc35967020c04a2cb71f0814d Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:14:57 +0800 Subject: [PATCH] fix: avoid initializing error when chain starts in a while --- cns/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cns/utils.py b/cns/utils.py index 4b7092d..8a0c9f6 100644 --- a/cns/utils.py +++ b/cns/utils.py @@ -71,7 +71,7 @@ def customize_web3(w3: "_Web3") -> "_Web3": if not w3.middleware_onion.get("stalecheck"): w3.middleware_onion.add( - build_stalecheck_middleware(ACCEPTABLE_STALE_HOURS * 3600, ["cfx_getBlockByEpochNumber"]), name="stalecheck" + build_stalecheck_middleware(ACCEPTABLE_STALE_HOURS * 3600, ["cfx_getBlockByEpochNumber", "cfx_getStatus"]), name="stalecheck" ) return w3