From 1ed338fc5f34f19adcf6e416e5740ca7af6c41d3 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 5 Oct 2018 20:00:01 +0200 Subject: [PATCH] Fixup comments --- 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 473a5f5f68..94dd9f0d0f 100644 --- a/x/slashing/keeper.go +++ b/x/slashing/keeper.go @@ -58,7 +58,7 @@ func (k Keeper) handleDoubleSign(ctx sdk.Context, addr crypto.Address, infractio logger.Info(fmt.Sprintf("Confirmed double sign from %s at height %d, age of %d less than max age of %d", pubkey.Address(), infractionHeight, age, maxEvidenceAge)) // We need to retrieve the stake distribution which signed the block, so we subtract ValidatorUpdateDelay from the evidence height. - // Note that this *can* result in a "distributionHeight" of -1, + // Note that this *can* result in a negative "distributionHeight", up to -ValidatorUpdateDelay, // i.e. at the end of the pre-genesis block (none) = at the beginning of the genesis block. // That's fine since this is just used to filter unbonding delegations & redelegations. distributionHeight := infractionHeight - stake.ValidatorUpdateDelay @@ -135,7 +135,7 @@ func (k Keeper) handleValidatorSignature(ctx sdk.Context, addr crypto.Address, p pubkey.Address(), minHeight, k.MinSignedPerWindow(ctx))) // 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. - // Note that this *can* result in a "distributionHeight" of -1 or -2, + // Note that this *can* result in a negative "distributionHeight" up to -ValidatorUpdateDelay-1, // i.e. at the end of the pre-genesis block (none) = at the beginning of the genesis block. // That's fine since this is just used to filter unbonding delegations & redelegations. distributionHeight := height - stake.ValidatorUpdateDelay - 1