Merge pull request #755 from tendermint/753-notified-mempool-txs-but-mempool-empty

WIP: only notify when there are some txs (Refs #753)
This commit is contained in:
Ethan Buchman 2017-10-23 10:31:38 -04:00 committed by GitHub
commit bd46b78785
1 changed files with 4 additions and 1 deletions

View File

@ -269,7 +269,10 @@ func (mem *Mempool) resCbRecheck(req *abci.Request, res *abci.Response) {
atomic.StoreInt32(&mem.rechecking, 0)
mem.logger.Info("Done rechecking txs")
mem.notifyTxsAvailable()
// incase the recheck removed all txs
if mem.Size() > 0 {
mem.notifyTxsAvailable()
}
}
default:
// ignore other messages