add logic to check tx to the mempool if marked added

This commit is contained in:
William Banfield
2022-03-08 17:37:16 -05:00
parent 3ae7382ed0
commit 041361da04
+5 -1
View File
@@ -128,7 +128,6 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
MaxTxBytes: maxDataBytes,
},
)
if err != nil {
// The App MUST ensure that only valid (and hence 'processable') transactions
// enter the mempool. Hence, at this point, we can't have any non-processable
@@ -148,6 +147,11 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
blockExec.logger.Debug("error removing transaction from the mempool", "error", err)
}
}
for _, rtx := range rpp.AddedTxs() {
if err := blockExec.mempool.CheckTx(ctx, rtx.Tx, nil, mempool.TxInfo{}); err != nil {
blockExec.logger.Debug("error removing transaction from the mempool", "error", err)
}
}
return state.MakeBlock(height, types.TxRecordsToTxs(rpp.IncludedTxs()), commit, evidence, proposerAddr)
}