From c510f823e7858d288e64b2a7c4149e1e155fac13 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 17 Dec 2018 20:35:05 +0400 Subject: [PATCH 1/2] 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 } From c6604b5a9b74c8de242ac9b033edb4f833c9a2d1 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 21 Dec 2018 16:31:28 -0500 Subject: [PATCH 2/2] changelog and version --- CHANGELOG.md | 10 ++++++++++ version/version.go | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0397ebdb5..46e9cb374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## v0.27.4 + +*December 21st, 2018* + +### BUG FIXES: + +- [mempool] [\#3036](https://github.com/tendermint/tendermint/issues/3036) Fix + LRU cache by popping the least recently used item when the cache is full, + not the most recently used one! + ## v0.27.3 *December 16th, 2018* diff --git a/version/version.go b/version/version.go index ace1b41d2..3cbdab02f 100644 --- a/version/version.go +++ b/version/version.go @@ -18,7 +18,7 @@ const ( // TMCoreSemVer is the current version of Tendermint Core. // It's the Semantic Version of the software. // Must be a string because scripts like dist.sh read this file. - TMCoreSemVer = "0.27.3" + TMCoreSemVer = "0.27.4" // ABCISemVer is the semantic version of the ABCI library ABCISemVer = "0.15.0"