Skip to content

Commit

Permalink
log error rather than panic on invalid subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBolten committed Feb 3, 2024
1 parent df8a077 commit aea55eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/pubsub/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ func (k Keeper) GetValidatorSubscribers(ctx sdk.Context) (subscribers []*types.S
for _, subscriber := range allSubscribers {
subscriberAddress, err := sdk.AccAddressFromBech32(subscriber.Address)
if err != nil {
panic(fmt.Errorf("subscriber address %s not valid bech32 but in state", subscriberAddress))
ctx.Logger().Error("subscriber address %s not valid bech32 but in state", subscriber.Address)
continue
}
var validatorI stakingtypes.ValidatorI
if validator := k.gravityKeeper.GetOrchestratorValidatorAddress(ctx, subscriberAddress); validator == nil {
Expand Down

0 comments on commit aea55eb

Please sign in to comment.