Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: sync with mainline ABCI #1003

Merged
merged 13 commits into from
Jul 20, 2023
4 changes: 2 additions & 2 deletions abci/example/kvstore/persistent_kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (app *PersistentKVStoreApplication) BeginBlock(req types.RequestBeginBlock)

// Punish validators who committed equivocation.
for _, ev := range req.ByzantineValidators {
if ev.Type == types.EvidenceType_DUPLICATE_VOTE {
if ev.Type == types.MisbehaviorType_DUPLICATE_VOTE {
addr := string(ev.Validator.Address)
if pubKey, ok := app.valAddrToPubKeyMap[addr]; ok {
app.updateValidator(types.ValidatorUpdate{
Expand Down Expand Up @@ -180,7 +180,7 @@ func (app *PersistentKVStoreApplication) PrepareProposal(

func (app *PersistentKVStoreApplication) ProcessProposal(
req types.RequestProcessProposal) types.ResponseProcessProposal {
return types.ResponseProcessProposal{Result: types.ResponseProcessProposal_ACCEPT}
return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT}
}

//---------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions abci/types/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ func (BaseApplication) ApplySnapshotChunk(req RequestApplySnapshotChunk) Respons
}

func (BaseApplication) PrepareProposal(req RequestPrepareProposal) ResponsePrepareProposal {
return ResponsePrepareProposal{BlockData: req.BlockData}
return ResponsePrepareProposal{Txs: req.Txs}
}

func (BaseApplication) ProcessProposal(req RequestProcessProposal) ResponseProcessProposal {
return ResponseProcessProposal{Result: ResponseProcessProposal_ACCEPT}
return ResponseProcessProposal{Status: ResponseProcessProposal_ACCEPT}
}

//-------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions abci/types/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ func (r ResponseQuery) IsErr() bool {

// IsUnknown returns true if Code is Unknown
cmwaters marked this conversation as resolved.
Show resolved Hide resolved
func (r ResponseProcessProposal) IsUnknown() bool {
return r.Result == ResponseProcessProposal_UNKNOWN
return r.Status == ResponseProcessProposal_UNKNOWN
}

// IsOK returns true if Code is OK
cmwaters marked this conversation as resolved.
Show resolved Hide resolved
func (r ResponseProcessProposal) IsOK() bool {
return r.Result == ResponseProcessProposal_ACCEPT
func (r ResponseProcessProposal) IsAccepted() bool {
return r.Status == ResponseProcessProposal_ACCEPT
}

// IsRejected returns true if this ResponseProcessProposal was rejected
func (r ResponseProcessProposal) IsRejected() bool {
return r.Result == ResponseProcessProposal_REJECT
return r.Status == ResponseProcessProposal_REJECT
}

//---------------------------------------------------------------------------
Expand Down
Loading