From a06912b5793787df769c2991270d86129d243349 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 17 Dec 2018 20:35:05 +0400 Subject: [PATCH] mempool: move tx to back, not front (#3036) because we pop txs from the front if the cache is full Refs #3035 --- mempool/mempool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempool/mempool.go b/mempool/mempool.go index c5f966c4e..3a1921bc2 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -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 }