mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Address comments III
- neatpicks
This commit is contained in:
parent
de11366a6f
commit
ae49295fa2
@ -118,16 +118,12 @@ class App(BaseApplication):
|
|||||||
self.abort_if_abci_chain_is_not_synced()
|
self.abort_if_abci_chain_is_not_synced()
|
||||||
|
|
||||||
# Check if BigchainDB supports the Tendermint version
|
# Check if BigchainDB supports the Tendermint version
|
||||||
try:
|
if not (hasattr(request, 'version') and tendermint_version_is_compatible(request.version)):
|
||||||
if tendermint_version_is_compatible(request.version):
|
logger.error(f'Unsupported Tendermint version: {getattr(request, "version", "no version")}.'
|
||||||
|
f' Currently, BigchainDB only supports {__tm_supported_versions__}. Exiting!')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
logger.info(f"Tendermint version: {request.version}")
|
logger.info(f"Tendermint version: {request.version}")
|
||||||
else:
|
|
||||||
logger.error(f"Error: Tendermint version {request.version} not supported."
|
|
||||||
f" Currently, BigchainDB only supports {__tm_supported_versions__}. Exiting!")
|
|
||||||
sys.exit(1)
|
|
||||||
except AttributeError:
|
|
||||||
logger.info("Tendermint version not found. Exiting!")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
r = ResponseInfo()
|
r = ResponseInfo()
|
||||||
block = self.bigchaindb.get_latest_block()
|
block = self.bigchaindb.get_latest_block()
|
||||||
|
|||||||
@ -205,5 +205,4 @@ def tendermint_version_is_compatible(running_tm_ver):
|
|||||||
for ver in __tm_supported_versions__:
|
for ver in __tm_supported_versions__:
|
||||||
if version.parse(ver) == version.parse(tm_ver[0]):
|
if version.parse(ver) == version.parse(tm_ver[0]):
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user