diff --git a/x/emissions/abci.go b/x/emissions/abci.go index bc15398209..824f0710d1 100644 --- a/x/emissions/abci.go +++ b/x/emissions/abci.go @@ -114,7 +114,10 @@ func DistributeObserverRewards(ctx sdk.Context, amount sdkmath.Int, keeper keepe continue } if observerRewardUnits < 0 { - slashAmount := keeper.GetParams(ctx).ObserverSlashAmount + slashAmount, ok := sdkmath.NewIntFromString(types.ObserverSlashAmount) + if !ok { + continue + } keeper.SlashObserverEmission(ctx, observerAddress.String(), slashAmount) finalDistributionList = append(finalDistributionList, &types.ObserverEmission{ EmissionType: types.EmissionType_Slash, diff --git a/x/emissions/types/keys.go b/x/emissions/types/keys.go index 9f1fa705fc..72c375fc18 100644 --- a/x/emissions/types/keys.go +++ b/x/emissions/types/keys.go @@ -29,6 +29,8 @@ const ( EmissionScheduledYears = 4 AvgBlockTime = "5.7" + + ObserverSlashAmount = "100000000000000000" ) func KeyPrefix(p string) []byte { diff --git a/x/emissions/types/params.go b/x/emissions/types/params.go index aa896f77e8..9849a02faa 100644 --- a/x/emissions/types/params.go +++ b/x/emissions/types/params.go @@ -54,7 +54,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyPrefix(ParamObserverEmissionPercentage), &p.ObserverEmissionPercentage, validateObserverEmissionPercentage), paramtypes.NewParamSetPair(KeyPrefix(ParamTssSignerEmissionPercentage), &p.TssSignerEmissionPercentage, validateTssEmissonPercentage), paramtypes.NewParamSetPair(KeyPrefix(ParamDurationFactorConstant), &p.DurationFactorConstant, validateDurationFactorConstant), - paramtypes.NewParamSetPair(KeyPrefix(ParamObserverSlashAmount), &p.ObserverSlashAmount, validateObserverSlashAmount), + //paramtypes.NewParamSetPair(KeyPrefix(ParamObserverSlashAmount), &p.ObserverSlashAmount, validateObserverSlashAmount), } }