Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez authored and tac0turtle committed Apr 12, 2023
1 parent 136403f commit 75873b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ func (app *BaseApp) ExtendVote(_ context.Context, req *abci.RequestExtendVote) (
return nil, fmt.Errorf("vote extensions are not enabled; unexpected call to ExtendVote at height %d", req.Height)
}

if app.extendVote == nil {
return nil, errors.New("application ExtendVote handler not set")
}

app.voteExtensionState.ctx = app.voteExtensionState.ctx.
WithConsensusParams(cp).
WithBlockGasMeter(storetypes.NewInfiniteGasMeter()).
Expand Down Expand Up @@ -656,6 +660,10 @@ func (app *BaseApp) VerifyVoteExtension(_ context.Context, req *abci.RequestVeri
return nil, fmt.Errorf("vote extensions are not enabled; unexpected call to VerifyVoteExtension at height %d", req.Height)
}

if app.verifyVoteExt == nil {
return nil, errors.New("application VerifyVoteExtension handler not set")
}

// add a deferred recover handler in case verifyVoteExt panics
defer func() {
if err := recover(); err != nil {
Expand Down

0 comments on commit 75873b6

Please sign in to comment.