change simple apps to use TxRecords

This commit is contained in:
William Banfield
2022-03-08 17:24:25 -05:00
parent cdae5e325b
commit d2ae45324c
2 changed files with 22 additions and 5 deletions
+8 -1
View File
@@ -300,7 +300,14 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a
}
func (app *Application) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
return abci.ResponsePrepareProposal{BlockData: req.BlockData}
trs := make([]*abci.TxRecord, len(req.Txs))
for i, tx := range req.Txs {
trs[i] = &abci.TxRecord{
Tx: tx,
Action: abci.TxRecord_UNMODIFIED,
}
}
return abci.ResponsePrepareProposal{TxRecords: trs}
}
// ProcessProposal implements part of the Application interface.