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.
This commit is contained in:
ValarDragon 2018-09-01 13:54:47 -07:00
parent b296209536
commit 52775f3329
1 changed files with 2 additions and 2 deletions

View File

@ -108,8 +108,8 @@ func (k Keeper) Slash(ctx sdk.Context, pubkey crypto.PubKey, infractionHeight in
// Log that a slash occurred! // Log that a slash occurred!
logger.Info(fmt.Sprintf( logger.Info(fmt.Sprintf(
"Validator %s slashed by slashFactor %v, burned %v tokens", "Validator %s slashed by slashFactor %s, burned %v tokens",
pubkey.Address(), slashFactor, tokensToBurn)) pubkey.Address(), slashFactor.String(), tokensToBurn))
// TODO Return event(s), blocked on https://github.com/tendermint/tendermint/pull/1803 // TODO Return event(s), blocked on https://github.com/tendermint/tendermint/pull/1803
return return