Address comments II

- Update name of tm version check function
- some typos
This commit is contained in:
Ahmed Muawia Khan 2018-09-13 19:34:50 +02:00
parent e5d725a96b
commit 01213e34e2
2 changed files with 5 additions and 3 deletions

View File

@ -119,7 +119,7 @@ class App(BaseApplication):
# Check if BigchainDB supports the Tendermint version # Check if BigchainDB supports the Tendermint version
try: try:
if check_tendermint_version(request.version): if tendermint_version_is_compatible(request.version):
logger.info(f"Tendermint version: {request.version}") logger.info(f"Tendermint version: {request.version}")
else: else:
logger.error(f"Error: Tendermint version {request.version} not supported." logger.error(f"Error: Tendermint version {request.version} not supported."

View File

@ -188,7 +188,7 @@ def load_node_key(path):
return key_pair_from_ed25519_key(hex_private_key) return key_pair_from_ed25519_key(hex_private_key)
def check_tendermint_version(running_tm_ver): def tendermint_version_is_compatible(running_tm_ver):
""" """
Check Tendermint compatability with BigchainDB server Check Tendermint compatability with BigchainDB server
@ -197,6 +197,8 @@ def check_tendermint_version(running_tm_ver):
:return: True/False depending on the compatability with BigchainDB server :return: True/False depending on the compatability with BigchainDB server
:rtype: bool :rtype: bool
""" """
# Splitting because version can look like this e.g. 0.22.8-40d6dc2e
tm_ver = running_tm_ver.split('-') tm_ver = running_tm_ver.split('-')
if not tm_ver: if not tm_ver:
return False return False