Skip to content

Commit

Permalink
update node version verify
Browse files Browse the repository at this point in the history
  • Loading branch information
coderkentzhang committed Nov 21, 2023
1 parent 97986fa commit 169cb99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bcos3sdk/bcos3client.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def init(self,client_config_instance=client_config):
self.check_node_version()
except Exception as e:
if client_config.bcos3_when_version_mismatch == "WARN":
print(f"!!! [WARN] CHECK NODE VERSION EXCEPTION(But still continue): {e} \n")
print(f"[INFO] CHECK NODE VERSION AND GO ON: {e} \n")
else:
raise e

Expand All @@ -104,7 +104,7 @@ def check_node_version(self):
if int(major) == majorVersion and int(minor) <= maxMinorVersion:
return True
else:
raise Exception(f"Python-sdk is NOT Fully Verified for node version [{version}] yet")
raise Exception(f"Python-sdk will verify for node version [{version}]")
except KeyError as e:
raise Exception(f"Check node version,Missing field in JSON :{e}. {strInfo}")
except ValueError as e:
Expand Down
2 changes: 1 addition & 1 deletion client_config.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class client_config:
bcos3_check_node_version = True #是否在初始化后验证一次node版本
bcos3_when_version_mismatch = "WARN" # WARN 或 "ERROR" ,如果版本不匹配,WARN只是打个警告,ERROR就抛异常了,建议WARN
bcos3_major_version = 3
bcos3_max_miner_version = 2 #目前最大版本号验证到3.2,后续新版本验证后持续更新
bcos3_max_miner_version = 6 #最大子版本号验证
# -------------------FISCO BCOS3.0 End-----------------------------------------

# --------------------------------------
Expand Down

0 comments on commit 169cb99

Please sign in to comment.