core: fix mempool error check in PoolTx

ErrAlreadyExists should be returned for ErrDup, not ErrConflict.
This commit is contained in:
Roman Khimov 2020-08-06 19:41:26 +03:00
parent 0e2784cd2c
commit 4c38fae54c

View file

@ -1381,7 +1381,7 @@ func (bc *Blockchain) PoolTx(t *transaction.Transaction) error {
switch err { switch err {
case mempool.ErrOOM: case mempool.ErrOOM:
return ErrOOM return ErrOOM
case mempool.ErrConflict: case mempool.ErrDup:
return fmt.Errorf("mempool: %w", ErrAlreadyExists) return fmt.Errorf("mempool: %w", ErrAlreadyExists)
default: default:
return err return err