-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: update test setup; refactor key_assignment addr parser
- Loading branch information
Showing
12 changed files
with
32 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -436,8 +436,7 @@ func (k Keeper) SlashValidator(ctx sdk.Context, providerAddr types.ProviderConsA | |
return fmt.Errorf("validator is tombstoned. provider consensus address: %s", providerAddr.String()) | ||
} | ||
|
||
// NOTE: on [email protected] validator.GetOperator() now returns a Hex string instead of sdk.ValAddress | ||
valAddr, err := sdk.ValAddressFromHex(validator.GetOperator()) | ||
valAddr, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) | ||
if err != nil { | ||
return err | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -455,14 +455,13 @@ func (k Keeper) AssignConsumerKey( | |
oldConsumerKey = providerKey | ||
} | ||
|
||
// NOTE: on [email protected] validator.GetOperator() now returns a Hex string instead of sdk.ValAddress | ||
valAddrBech32, err := sdk.ValAddressFromHex(validator.GetOperator()) | ||
valAddr, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
// check whether the validator is valid, i.e., its power is positive | ||
power, err := k.stakingKeeper.GetLastValidatorPower(ctx, valAddrBech32) | ||
power, err := k.stakingKeeper.GetLastValidatorPower(ctx, valAddr) | ||
if err != nil { | ||
return err | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters