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 1/2] 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 From 2e53d8dec42ff6ccefeb078338e60aebe488b56f Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:07:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Bump=20version:=201.4.0-beta.3=20=E2=86=92?= =?UTF-8?q?=201.4.0-beta.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- setup.py | 2 +- tests/base_features/test_api.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7109769..a2c504b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.4.0-beta.3 +current_version = 1.4.0-beta.4 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(-(?P[^.]*)\.(?P\d+))? diff --git a/setup.py b/setup.py index 4431d21..7048c57 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup, ) -VERSION = "1.4.0-beta.3" +VERSION = "1.4.0-beta.4" DESCRIPTION = 'Python SDK for Conflux network' with open('./README.md') as readme: long_description = readme.read() diff --git a/tests/base_features/test_api.py b/tests/base_features/test_api.py index 110a2aa..82ecf90 100644 --- a/tests/base_features/test_api.py +++ b/tests/base_features/test_api.py @@ -1,4 +1,4 @@ def test_api_version(w3): - expected_version = "1.4.0-beta.3" + expected_version = "1.4.0-beta.4" if "beta" not in expected_version: assert w3.api.startswith(expected_version)