From 4fee7913b5415fb532b363d39c7a498092cfada8 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Wed, 3 Oct 2018 17:59:01 +0200 Subject: [PATCH] Fix issue from earlier merge --- x/slashing/keeper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/slashing/keeper.go b/x/slashing/keeper.go index d41c2d12d7..73d4113679 100644 --- a/x/slashing/keeper.go +++ b/x/slashing/keeper.go @@ -66,7 +66,7 @@ func (k Keeper) handleDoubleSign(ctx sdk.Context, addr crypto.Address, infractio distributionHeight := infractionHeight - ValidatorUpdateDelay // Slash validator - k.validatorSet.Slash(ctx, consAddr, infractionHeight, power, revisedFraction) + k.validatorSet.Slash(ctx, consAddr, distributionHeight, power, revisedFraction) // Jail validator k.validatorSet.Jail(ctx, consAddr) @@ -129,7 +129,7 @@ func (k Keeper) handleValidatorSignature(ctx sdk.Context, addr crypto.Address, p // We need to retrieve the stake distribution which signed the block, so we subtract ValidatorUpdateDelay from the evidence height, // and subtract an additional 1 since this is the LastCommit. distributionHeight := height - ValidatorUpdateDelay - 1 - k.validatorSet.Slash(ctx, consAddr, height, power, k.SlashFractionDowntime(ctx)) + k.validatorSet.Slash(ctx, consAddr, distributionHeight, power, k.SlashFractionDowntime(ctx)) k.validatorSet.Jail(ctx, consAddr) signInfo.JailedUntil = ctx.BlockHeader().Time.Add(k.DowntimeUnbondDuration(ctx)) } else {