From 2dc6194e9b72b631e7be2b46a1728bc2ee003966 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 11 Apr 2023 12:10:35 -0400 Subject: [PATCH] updates --- baseapp/abci.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/baseapp/abci.go b/baseapp/abci.go index aa3da445e470..4080a4dd2251 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -608,6 +608,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()). @@ -653,6 +657,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 {