fix validator address prefix (#9212)
Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
@@ -165,7 +165,7 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab
|
||||
}
|
||||
|
||||
// fetch the old power bytes
|
||||
valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixValAddr, valAddr)
|
||||
valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.GetConfig().GetBech32ValidatorAddrPrefix(), valAddr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -363,7 +363,7 @@ func (k Keeper) getLastValidatorsByAddr(ctx sdk.Context) (validatorsByAddr, erro
|
||||
for ; iterator.Valid(); iterator.Next() {
|
||||
// extract the validator address from the key (prefix is 1-byte, addrLen is 1-byte)
|
||||
valAddr := types.AddressFromLastValidatorPowerKey(iterator.Key())
|
||||
valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixValAddr, valAddr)
|
||||
valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.GetConfig().GetBech32ValidatorAddrPrefix(), valAddr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user