create separate removed list in kvstore

This commit is contained in:
William Banfield
2022-03-14 17:29:51 -04:00
parent 4bf2027d3c
commit c8844abd62
+3 -2
View File
@@ -436,9 +436,10 @@ func (app *Application) execPrepareTx(tx []byte) *types.ExecTxResult {
// Tendermint will remove them from its mempool.
func (app *Application) substPrepareTx(blockData [][]byte) []*types.TxRecord {
trs := make([]*types.TxRecord, len(blockData))
var removed []*types.TxRecord
for i, tx := range blockData {
if isPrepareTx(tx) {
trs = append(trs, &types.TxRecord{
removed = append(removed, &types.TxRecord{
Tx: tx,
Action: types.TxRecord_REMOVED,
})
@@ -454,5 +455,5 @@ func (app *Application) substPrepareTx(blockData [][]byte) []*types.TxRecord {
}
}
return trs
return append(trs, removed...)
}