Browse Source

mempool: move tx to back, not front (#3036)

because we pop txs from the front if the cache is full

Refs #3035
pull/3045/head
Anton Kaliaev 6 years ago
committed by Ethan Buchman
parent
commit
a06912b579
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mempool/mempool.go

+ 1
- 1
mempool/mempool.go View File

@ -676,7 +676,7 @@ func (cache *mapTxCache) Push(tx types.Tx) bool {
// Use the tx hash in the cache
txHash := sha256.Sum256(tx)
if moved, exists := cache.map_[txHash]; exists {
cache.list.MoveToFront(moved)
cache.list.MoveToBack(moved)
return false
}


Loading…
Cancel
Save