From 145838d1c3e1508533bd67ca0d49a43bb053ca73 Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 25 Apr 2022 16:35:21 +0300 Subject: [PATCH] init chain recoginez function fixed . --- planetmint/backend/tarantool/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planetmint/backend/tarantool/query.py b/planetmint/backend/tarantool/query.py index 4961187..a7e7d3b 100644 --- a/planetmint/backend/tarantool/query.py +++ b/planetmint/backend/tarantool/query.py @@ -176,7 +176,7 @@ def get_latest_block(connection): # TODO Here is used DESCENDING OPERATOR heigth = 0 txs = [] if len(_all_blocks) > 0: - _block = sorted(_all_blocks, key=itemgetter(1))[0] + _block = sorted(_all_blocks, key=itemgetter(1), reverse=True)[0] space = connection.space("blocks_tx") _txids = space.select(_block[2], index="block_search") _txids = _txids.data