11package org .tron .core .db .api ;
22
3- import static com .googlecode .cqengine .query .QueryFactory .applyThresholds ;
43import static com .googlecode .cqengine .query .QueryFactory .ascending ;
54import static com .googlecode .cqengine .query .QueryFactory .equal ;
65import static com .googlecode .cqengine .query .QueryFactory .orderBy ;
76import static com .googlecode .cqengine .query .QueryFactory .queryOptions ;
8- import static com .googlecode .cqengine .query .QueryFactory .threshold ;
9- import static com .googlecode .cqengine .query .option .EngineThresholds .INDEX_ORDERING_SELECTIVITY ;
107import static org .tron .core .config .Parameter .DatabaseConstants .TRANSACTIONS_COUNT_LIMIT_MAX ;
118
129import com .google .common .collect .ImmutableList ;
@@ -103,8 +100,7 @@ public List<Transaction> getTransactionsFromThis(String address, long offset, lo
103100 index .retrieve (
104101 equal (TransactionIndex .OWNERS , address ),
105102 queryOptions (
106- orderBy (ascending (TransactionIndex .TIMESTAMP )),
107- applyThresholds (threshold (INDEX_ORDERING_SELECTIVITY , 1.0 ))))) {
103+ orderBy (ascending (TransactionIndex .INDEX_CREATE_TIMESTAMP ))))) {
108104 if (limit > TRANSACTIONS_COUNT_LIMIT_MAX ) {
109105 limit = TRANSACTIONS_COUNT_LIMIT_MAX ;
110106 }
@@ -122,8 +118,7 @@ public List<Transaction> getTransactionsToThis(String address, long offset, long
122118 index .retrieve (
123119 equal (TransactionIndex .TOS , address ),
124120 queryOptions (
125- orderBy (ascending (TransactionIndex .TIMESTAMP )),
126- applyThresholds (threshold (INDEX_ORDERING_SELECTIVITY , 1.0 ))))) {
121+ orderBy (ascending (TransactionIndex .INDEX_CREATE_TIMESTAMP ))))) {
127122 if (limit > TRANSACTIONS_COUNT_LIMIT_MAX ) {
128123 limit = TRANSACTIONS_COUNT_LIMIT_MAX ;
129124 }
0 commit comments