Skip to content

Commit

Permalink
fix!: update cons params parsing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Aug 30, 2024
1 parent b33ed07 commit c70a955
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/consensus/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func (k Keeper) paramCheck(ctx context.Context, consensusParams cmtproto.Consens

paramsProto, err := k.ParamsStore.Get(ctx)
if err == nil {
// initialize version params with zero value if not set
if paramsProto.Version == nil {
paramsProto.Version = &cmtproto.VersionParams{}
}
params = cmttypes.ConsensusParamsFromProto(paramsProto)
} else if errors.Is(err, collections.ErrNotFound) {
params = cmttypes.ConsensusParams{}
Expand Down

0 comments on commit c70a955

Please sign in to comment.