Browse Source

remove empty tx records in substPrepareTx

wb/txrset
William Banfield 3 years ago
parent
commit
3c35f894f3
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      abci/example/kvstore/kvstore.go

+ 4
- 0
abci/example/kvstore/kvstore.go View File

@ -436,6 +436,10 @@ func (app *Application) substPrepareTx(blockData [][]byte) []*types.TxRecord {
trs := make([]*types.TxRecord, len(blockData)) trs := make([]*types.TxRecord, len(blockData))
for i, tx := range blockData { for i, tx := range blockData {
if isPrepareTx(tx) { if isPrepareTx(tx) {
trs = append(trs, &types.TxRecord{
Tx: tx,
Action: types.TxRecord_REMOVED,
})
trs[i] = &types.TxRecord{ trs[i] = &types.TxRecord{
Tx: make([]byte, len(tx)), Tx: make([]byte, len(tx)),
Action: types.TxRecord_ADDED, Action: types.TxRecord_ADDED,


Loading…
Cancel
Save