Skip to content

Commit

Permalink
removed panic
Browse files Browse the repository at this point in the history
  • Loading branch information
insumity committed May 31, 2024
1 parent e606ab7 commit eb2da24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/ccv/provider/keeper/validator_set_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ func (k Keeper) GetConsumerValidator(ctx sdk.Context, chainID string, providerAd

var validator types.ConsumerValidator
if err := validator.Unmarshal(marshalledConsumerValidator); err != nil {
panic(fmt.Errorf("failed to unmarshal ConsumerValidator: %w", err))
k.Logger(ctx).Error("failed to unmarshal ConsumerValidator",
"marshalledConsumerValidator", marshalledConsumerValidator,
"error", err)
return types.ConsumerValidator{}, false
}

return validator, true
Expand Down

0 comments on commit eb2da24

Please sign in to comment.