ABCI++: Update new protos to use enum instead of bool

This commit is contained in:
William Banfield
2022-03-18 16:37:37 -04:00
parent 5b6849ccf7
commit b70e8c65f5
14 changed files with 552 additions and 404 deletions
+3 -3
View File
@@ -306,7 +306,7 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a
func (app *Application) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
// None of the transactions are modified by this application.
return abci.ResponsePrepareProposal{ModifiedTx: false}
return abci.ResponsePrepareProposal{ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED}
}
// ProcessProposal implements part of the Application interface.
@@ -315,10 +315,10 @@ func (app *Application) ProcessProposal(req abci.RequestProcessProposal) abci.Re
for _, tx := range req.Txs {
_, _, err := parseTx(tx)
if err != nil {
return abci.ResponseProcessProposal{Accept: false}
return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}
}
}
return abci.ResponseProcessProposal{Accept: true}
return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}
}
func (app *Application) Rollback() error {