mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 13:21:20 +00:00
mempool: move tx to back, not front (#3036)
because we pop txs from the front if the cache is full Refs #3035
This commit is contained in:
committed by
Ethan Buchman
parent
0138530df2
commit
c510f823e7
@ -676,7 +676,7 @@ func (cache *mapTxCache) Push(tx types.Tx) bool {
|
|||||||
// Use the tx hash in the cache
|
// Use the tx hash in the cache
|
||||||
txHash := sha256.Sum256(tx)
|
txHash := sha256.Sum256(tx)
|
||||||
if moved, exists := cache.map_[txHash]; exists {
|
if moved, exists := cache.map_[txHash]; exists {
|
||||||
cache.list.MoveToFront(moved)
|
cache.list.MoveToBack(moved)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user