forked from Qortal/qortal
Speed up fetching transactions using block signature
This commit is contained in:
parent
c628f97d8c
commit
5ea90f2fdd
@ -175,7 +175,11 @@ public class HSQLDBBlockRepository implements BlockRepository {
|
|||||||
public List<TransactionData> getTransactionsFromSignature(byte[] signature, Integer limit, Integer offset, Boolean reverse) throws DataException {
|
public List<TransactionData> getTransactionsFromSignature(byte[] signature, Integer limit, Integer offset, Boolean reverse) throws DataException {
|
||||||
StringBuilder sql = new StringBuilder(256);
|
StringBuilder sql = new StringBuilder(256);
|
||||||
|
|
||||||
sql.append("SELECT transaction_signature FROM BlockTransactions WHERE block_signature = ? ORDER BY sequence");
|
sql.append("SELECT transaction_signature FROM BlockTransactions WHERE block_signature = ? ORDER BY block_signature");
|
||||||
|
if (reverse != null && reverse)
|
||||||
|
sql.append(" DESC");
|
||||||
|
|
||||||
|
sql.append(", sequence");
|
||||||
if (reverse != null && reverse)
|
if (reverse != null && reverse)
|
||||||
sql.append(" DESC");
|
sql.append(" DESC");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user