From 4d6b2404761addf1d03813b46172530cc903c993 Mon Sep 17 00:00:00 2001 From: Gui Iribarren Date: Mon, 9 Sep 2024 17:45:39 +0200 Subject: [PATCH] (lts-backport) hotfix GetLastTransactions --- vochain/indexer/db/transactions.sql.go | 2 +- vochain/indexer/queries/transactions.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vochain/indexer/db/transactions.sql.go b/vochain/indexer/db/transactions.sql.go index fe1b03ae9..c91b2531e 100644 --- a/vochain/indexer/db/transactions.sql.go +++ b/vochain/indexer/db/transactions.sql.go @@ -79,7 +79,7 @@ func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionPa const getLastTransactions = `-- name: GetLastTransactions :many SELECT hash, block_height, block_index, type, subtype, raw_tx, signature, signer FROM transactions -ORDER BY id DESC +ORDER BY block_height DESC LIMIT ? OFFSET ? ` diff --git a/vochain/indexer/queries/transactions.sql b/vochain/indexer/queries/transactions.sql index 6988789a5..275ff6e27 100644 --- a/vochain/indexer/queries/transactions.sql +++ b/vochain/indexer/queries/transactions.sql @@ -21,7 +21,7 @@ LIMIT 1; -- name: GetLastTransactions :many SELECT * FROM transactions -ORDER BY id DESC +ORDER BY block_height DESC LIMIT ? OFFSET ? ;