Skip to content

Commit

Permalink
fix: x/staking ValAddressFromBech32
Browse files Browse the repository at this point in the history
  • Loading branch information
Kynea0b committed Jul 14, 2022
1 parent 8e6afcf commit aea5bdb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/staking/keeper/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit aea5bdb

Please sign in to comment.