Skip to content

Commit

Permalink
apply InfractionType migration
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Apr 13, 2023
1 parent fb2aea0 commit d895721
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions x/ccv/types/ccv.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (mat VSCMaturedPacketData) GetBytes() []byte {
return bytes
}

func NewSlashPacketData(validator abci.Validator, valUpdateId uint64, infractionType stakingtypes.InfractionType) *SlashPacketData {
func NewSlashPacketData(validator abci.Validator, valUpdateId uint64, infractionType stakingtypes.Infraction) *SlashPacketData {
return &SlashPacketData{
Validator: validator,
ValsetUpdateId: valUpdateId,
Expand All @@ -64,7 +64,7 @@ func (vdt SlashPacketData) ValidateBasic() error {
return sdkerrors.Wrap(ErrInvalidPacketData, "validator fields cannot be empty")
}

if vdt.Infraction == stakingtypes.InfractionEmpty {
if vdt.Infraction == stakingtypes.Infraction_INFRACTION_UNSPECIFIED {
return sdkerrors.Wrap(ErrInvalidPacketData, "invalid infraction type")
}

Expand Down
2 changes: 1 addition & 1 deletion x/ccv/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type StakingKeeper interface {
GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) (power int64)
// slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction
Jail(sdk.Context, sdk.ConsAddress) // jail a validator
Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec, stakingtypes.InfractionType)
Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec, stakingtypes.Infraction)
Unjail(ctx sdk.Context, addr sdk.ConsAddress)
GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
IterateLastValidatorPowers(ctx sdk.Context, cb func(addr sdk.ValAddress, power int64) (stop bool))
Expand Down

0 comments on commit d895721

Please sign in to comment.