Skip to content

Commit 6ec04a1

Browse files
authored
Merge pull request #1843 from tronprotocol/impl_getunchecked_transactionStore
repush use transactionStore.has() to improve performance for finding
2 parents 02b06d6 + 4896fe4 commit 6ec04a1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/main/java/org/tron/core/db/Manager.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,13 +1604,8 @@ public synchronized void preValidateTransactionSign(BlockCapsule block)
16041604
}
16051605

16061606
public void rePush(TransactionCapsule tx) {
1607-
1608-
try {
1609-
if (transactionStore.get(tx.getTransactionId().getBytes()) != null) {
1610-
return;
1611-
}
1612-
} catch (BadItemException e) {
1613-
// do nothing
1607+
if (transactionStore.has(tx.getTransactionId().getBytes())) {
1608+
return;
16141609
}
16151610

16161611
try {

0 commit comments

Comments
 (0)