Tendermint version (use tendermint version or git rev-parse --verify HEAD if installed from source): 569981325a43c18e65beb193adf7d172a498a5bc
What happened:
consensus\replay.go line 476 : blockExec := sm.NewBlockExecutor(h.stateDB, h.logger, proxyApp, mock.Mempool{}, sm.MockEvidencePool{})mock.Mempool{} to initialize the blockExec? I notice that the comment showing that Mempool is used for testMempool, the structure CListMempool is easy to achieve the additional functions, but the structure Mempool is a empty struct. So it is hard for me to achieve the logic code.What you expected to happen:
CListMempool to initialize the blockExecIt's weird that test code was used in production code.
It's simple. Because we don't need both of them (mempool and evidence pool) during replay (replaying missing blocks to application). mempool - we don't need to reap transactions. evidence pool - we don't need to reap evidence. block is already there (created before), Tendermint just replaying it to the application.
I hope https://github.com/tendermint/tendermint/pull/4785 clarifies things a bit. Thanks for bringing this to our attention!
Most helpful comment
It's weird that test code was used in production code.