From 52775f33294eb833bb14d7d2f83e32d84391b696 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Sat, 1 Sep 2018 13:54:47 -0700 Subject: [PATCH] Make the slashing logger print a string representation of slashFactor It used to print the decimal number, which has an extra factor of 10**10, and is thus confusing. --- x/stake/keeper/slash.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/stake/keeper/slash.go b/x/stake/keeper/slash.go index aa6fe974d..14ad1551f 100644 --- a/x/stake/keeper/slash.go +++ b/x/stake/keeper/slash.go @@ -108,8 +108,8 @@ func (k Keeper) Slash(ctx sdk.Context, pubkey crypto.PubKey, infractionHeight in // Log that a slash occurred! logger.Info(fmt.Sprintf( - "Validator %s slashed by slashFactor %v, burned %v tokens", - pubkey.Address(), slashFactor, tokensToBurn)) + "Validator %s slashed by slashFactor %s, burned %v tokens", + pubkey.Address(), slashFactor.String(), tokensToBurn)) // TODO Return event(s), blocked on https://github.com/tendermint/tendermint/pull/1803 return