diff --git a/src/main/java/org/tron/core/db/api/StoreAPI.java b/src/main/java/org/tron/core/db/api/StoreAPI.java index 3c8633ae946..ffcd4ff87fd 100644 --- a/src/main/java/org/tron/core/db/api/StoreAPI.java +++ b/src/main/java/org/tron/core/db/api/StoreAPI.java @@ -100,7 +100,7 @@ public List getTransactionsFromThis(String address, long offset, lo index.retrieve( equal(TransactionIndex.OWNERS, address), queryOptions( - orderBy(ascending(TransactionIndex.INDEX_CREATE_TIMESTAMP))))) { + orderBy(ascending(TransactionIndex.TIMESTAMP))))) { if (limit > TRANSACTIONS_COUNT_LIMIT_MAX) { limit = TRANSACTIONS_COUNT_LIMIT_MAX; } @@ -118,7 +118,7 @@ public List getTransactionsToThis(String address, long offset, long index.retrieve( equal(TransactionIndex.TOS, address), queryOptions( - orderBy(ascending(TransactionIndex.INDEX_CREATE_TIMESTAMP))))) { + orderBy(ascending(TransactionIndex.TIMESTAMP))))) { if (limit > TRANSACTIONS_COUNT_LIMIT_MAX) { limit = TRANSACTIONS_COUNT_LIMIT_MAX; } diff --git a/src/main/java/org/tron/core/db/api/index/TransactionIndex.java b/src/main/java/org/tron/core/db/api/index/TransactionIndex.java index e4dc8af78ca..216e9964887 100644 --- a/src/main/java/org/tron/core/db/api/index/TransactionIndex.java +++ b/src/main/java/org/tron/core/db/api/index/TransactionIndex.java @@ -27,7 +27,6 @@ public class TransactionIndex extends AbstractIndex OWNERS; public static Attribute TOS; public static Attribute TIMESTAMP; - public static Attribute INDEX_CREATE_TIMESTAMP; @Autowired public TransactionIndex( @@ -42,7 +41,6 @@ public void init() { index.addIndex(DiskIndex.onAttribute(OWNERS)); index.addIndex(DiskIndex.onAttribute(TOS)); index.addIndex(DiskIndex.onAttribute(TIMESTAMP)); - index.addIndex(DiskIndex.onAttribute(INDEX_CREATE_TIMESTAMP)); } @Override @@ -66,8 +64,5 @@ protected void setAttribute() { .collect(Collectors.toList())); TIMESTAMP = attribute("timestamp", bytes -> getObject(bytes).getRawData().getTimestamp()); - INDEX_CREATE_TIMESTAMP = - attribute("index create timestamp", bytes -> System.currentTimeMillis()); - } }