diff --git a/pkg/core/mempool/mem_pool.go b/pkg/core/mempool/mem_pool.go index 00fcb464c..b4798d004 100644 --- a/pkg/core/mempool/mem_pool.go +++ b/pkg/core/mempool/mem_pool.go @@ -136,14 +136,14 @@ func (mp *Pool) Add(t *transaction.Transaction, fee Feer) error { timeStamp: time.Now().UTC(), } mp.lock.Lock() - if !mp.checkTxConflicts(t, fee) { - mp.lock.Unlock() - return ErrConflict - } if mp.containsKey(t.Hash()) { mp.lock.Unlock() return ErrDup } + if !mp.checkTxConflicts(t, fee) { + mp.lock.Unlock() + return ErrConflict + } mp.verifiedMap[t.Hash()] = pItem // Insert into sorted array (from max to min, that could also be done