File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/java/org/tron/core/db Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -594,8 +594,7 @@ void validateCommon(TransactionCapsule transactionCapsule)
594
594
}
595
595
596
596
void validateDup (TransactionCapsule transactionCapsule ) throws DupTransactionException {
597
- if (getTransactionStore ().getUnchecked (transactionCapsule .getTransactionId ().getBytes ())
598
- != null ) {
597
+ if (getTransactionStore ().has (transactionCapsule .getTransactionId ().getBytes ())) {
599
598
logger .debug (ByteArray .toHexString (transactionCapsule .getTransactionId ().getBytes ()));
600
599
throw new DupTransactionException ("dup trans" );
601
600
}
Original file line number Diff line number Diff line change @@ -86,6 +86,15 @@ public TransactionCapsule get(byte[] key) throws BadItemException {
86
86
return transactionCapsule == null ? new TransactionCapsule (value ) : transactionCapsule ;
87
87
}
88
88
89
+ @ Override
90
+ public TransactionCapsule getUnchecked (byte [] key ) {
91
+ try {
92
+ return get (key );
93
+ } catch (Exception e ) {
94
+ return null ;
95
+ }
96
+ }
97
+
89
98
/**
90
99
* get total transaction.
91
100
*/
You can’t perform that action at this time.
0 commit comments