From aea5bdb4b35ecfdc887cd8256fe149d7442fda7f Mon Sep 17 00:00:00 2001 From: mariko Date: Thu, 14 Jul 2022 17:21:41 +0900 Subject: [PATCH] fix: x/staking ValAddressFromBech32 --- x/staking/keeper/validator.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index d40eef4397..dd93bd3785 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -422,7 +422,10 @@ func (k Keeper) UnbondAllMatureValidators(ctx sdk.Context) { k.cdc.MustUnmarshal(unbondingValIterator.Value(), &addrs) for _, valAddr := range addrs.Addresses { - addr := sdk.ValAddress(valAddr) + addr, err := sdk.ValAddressFromBech32(valAddr) + if err != nil { + panic(err) + } val, found := k.GetValidator(ctx, addr) if !found { panic("validator in the unbonding queue was not found")