Skip to content

Commit

Permalink
dont panic if no paramstore is set
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Mar 28, 2023
1 parent 05fecfa commit 52f8f06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func (app *BaseApp) setState(mode runTxMode, header cmtproto.Header) {
// ParamStore. If the BaseApp has no ParamStore defined, nil is returned.
func (app *BaseApp) GetConsensusParams(ctx sdk.Context) cmtproto.ConsensusParams {
if app.paramStore == nil {
panic("param store not set")
return cmtproto.ConsensusParams{}
}

cp, err := app.paramStore.Get(ctx)
Expand Down
3 changes: 1 addition & 2 deletions server/mock/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import (
"testing"
"time"

"cosmossdk.io/log"
abci "github.com/cometbft/cometbft/abci/types"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/stretchr/testify/require"

"cosmossdk.io/log"

simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
)
Expand Down

0 comments on commit 52f8f06

Please sign in to comment.