Browse Source

create separate removed list in kvstore

pull/8094/head
William Banfield 3 years ago
parent
commit
c8844abd62
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      abci/example/kvstore/kvstore.go

+ 3
- 2
abci/example/kvstore/kvstore.go 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...)
}

Loading…
Cancel
Save