From 69e6cf7df0ab9abf89ea9558fd0dd84e9f2f08e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Tue, 10 Jan 2023 09:45:33 +0100 Subject: [PATCH] fixed wrong index name issue: transaction_by_asset vs transaction_by_asset_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- planetmint/backend/tarantool/const.py | 2 +- planetmint/backend/tarantool/query.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/planetmint/backend/tarantool/const.py b/planetmint/backend/tarantool/const.py index 0f724e7..80b09e2 100644 --- a/planetmint/backend/tarantool/const.py +++ b/planetmint/backend/tarantool/const.py @@ -14,5 +14,5 @@ TARANT_TABLE_SCRIPT = "scripts" TARANT_TX_ID_SEARCH = "transaction_id" TARANT_ID_SEARCH = "id" -TARANT_INDEX_TX_BY_ASSET_ID = "transactions_by_asset" +TARANT_INDEX_TX_BY_ASSET_ID = "transactions_by_asset_id" TARANT_INDEX_SPENDING_BY_ID_AND_OUTPUT_INDEX = "spending_transaction_by_id_and_output_index" diff --git a/planetmint/backend/tarantool/query.py b/planetmint/backend/tarantool/query.py index 2a55a44..e9f0369 100644 --- a/planetmint/backend/tarantool/query.py +++ b/planetmint/backend/tarantool/query.py @@ -242,12 +242,12 @@ def get_txids_filtered(connection, asset_ids: list[str], operation: str = "", la ) elif operation == "TRANSFER": transactions = connection.run( - connection.space(TARANT_TABLE_TRANSACTION).select(asset_ids, index="transactions_by_asset") + connection.space(TARANT_TABLE_TRANSACTION).select(asset_ids, index=TARANT_INDEX_TX_BY_ASSET_ID) ) else: txs = connection.run(connection.space(TARANT_TABLE_TRANSACTION).select(asset_ids, index=TARANT_ID_SEARCH)) asset_txs = connection.run( - connection.space(TARANT_TABLE_TRANSACTION).select(asset_ids, index="transactions_by_asset") + connection.space(TARANT_TABLE_TRANSACTION).select(asset_ids, index=TARANT_INDEX_TX_BY_ASSET_ID) ) transactions = txs + asset_txs