Fixed SystemExit error by inversing sorting of array

This commit is contained in:
andrei 2022-06-08 12:51:14 +03:00
parent 4f880ce66f
commit d56e734560

View File

@ -548,5 +548,5 @@ def get_latest_abci_chain(connection):
) )
if _all_chains is None or len(_all_chains) == 0: if _all_chains is None or len(_all_chains) == 0:
return None return None
_chain = sorted(_all_chains, key=itemgetter(0), reverse=True)[0] _chain = sorted(_all_chains, key=itemgetter(0), reverse=False)[0]
return {"height": _chain[0], "is_synced": _chain[1], "chain_id": _chain[2]} return {"height": _chain[0], "is_synced": _chain[1], "chain_id": _chain[2]}