change app prepareproposal

This commit is contained in:
William Banfield
2022-03-11 16:41:56 -05:00
parent 5849b16dff
commit d3c4f7c7d9
+4 -8
View File
@@ -300,14 +300,10 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a
}
func (app *Application) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
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}
// None of the transactions are modified by the application, return a ResponsePrepareProposal
// with ModifiedTx set to false. false is the zero-value in go, so an empty ResponsePrepareProposal
// will set the field appropriately.
return abci.ResponsePrepareProposal{}
}
// ProcessProposal implements part of the Application interface.