From 3fa734ef5a214a1726ae077ce41b60574c232b8f Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 4 Jun 2018 14:28:47 +0400 Subject: [PATCH] recheck only if there are txs left in the mempool (#1645) --- mempool/mempool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempool/mempool.go b/mempool/mempool.go index 438da7299..5af16b3c9 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -386,7 +386,7 @@ func (mem *Mempool) Update(height int64, txs types.Txs) error { // Recheck mempool txs if any txs were committed in the block // NOTE/XXX: in some apps a tx could be invalidated due to EndBlock, // so we really still do need to recheck, but this is for debugging - if mem.config.Recheck && (mem.config.RecheckEmpty || len(txs) > 0) { + if mem.config.Recheck && (mem.config.RecheckEmpty || len(goodTxs) > 0) { mem.logger.Info("Recheck txs", "numtxs", len(goodTxs), "height", height) mem.recheckTxs(goodTxs) // At this point, mem.txs are being rechecked.