diff options
author | Crispin Flowerday <crispin@bitso.com> | 2018-04-27 07:43:18 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-05-02 16:04:40 +0800 |
commit | 0afd7675372798bd1a71c6a78472835a54d60b54 (patch) | |
tree | 2db00b39a566c9267f5ecc8b26241b1a629d5e43 /core/tx_pool.go | |
parent | 448d17b8f735cbd16cf48351389c00630db9725a (diff) | |
download | go-tangerine-0afd7675372798bd1a71c6a78472835a54d60b54.tar.gz go-tangerine-0afd7675372798bd1a71c6a78472835a54d60b54.tar.zst go-tangerine-0afd7675372798bd1a71c6a78472835a54d60b54.zip |
core: ensure local transactions aren't discarded as underpriced
This fixes an issue where local transactions are discarded as
underpriced when the pool and queue are full.
Diffstat (limited to 'core/tx_pool.go')
-rw-r--r-- | core/tx_pool.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go index b21384458..388b40058 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -618,7 +618,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (bool, error) { // If the transaction pool is full, discard underpriced transactions if uint64(len(pool.all)) >= pool.config.GlobalSlots+pool.config.GlobalQueue { // If the new transaction is underpriced, don't accept it - if pool.priced.Underpriced(tx, pool.locals) { + if !local && pool.priced.Underpriced(tx, pool.locals) { log.Trace("Discarding underpriced transaction", "hash", hash, "price", tx.GasPrice()) underpricedTxCounter.Inc(1) return false, ErrUnderpriced |