From 20de67780b485ea7a1d9fb0306d3e8c993b6f1be Mon Sep 17 00:00:00 2001 From: Marko Date: Sat, 6 Jan 2024 13:16:01 +0100 Subject: [PATCH] chore(x/slashing): follow up (#18962) --- CHANGELOG.md | 1 - x/slashing/CHANGELOG.md | 2 ++ x/slashing/types/params.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb660ec2aa..aaf8af5713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -191,7 +191,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (types) [#18372](https://github.com/cosmos/cosmos-sdk/pull/18372) Removed global configuration for coin type and purpose. Setters and getters should be removed and access directly to defined types. * (types) [#18695](https://github.com/cosmos/cosmos-sdk/pull/18695) Removed global configuration for txEncoder. * (server) [#18909](https://github.com/cosmos/cosmos-sdk/pull/18909) Remove configuration endpoint on grpc reflection endpoint in favour of auth module bech32prefix endpoint already exposed. -* (slashing) [#18959](https://github.com/cosmos/cosmos-sdk/pull/18959) Slight speedup to Slashing Beginblock logic ### CLI Breaking Changes diff --git a/x/slashing/CHANGELOG.md b/x/slashing/CHANGELOG.md index 85ad31d779..ad84f25997 100644 --- a/x/slashing/CHANGELOG.md +++ b/x/slashing/CHANGELOG.md @@ -29,6 +29,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [#18959](https://github.com/cosmos/cosmos-sdk/pull/18959) Avoid deserialization of parameters with every validator lookup + ### API Breaking Changes ### Bug Fixes diff --git a/x/slashing/types/params.go b/x/slashing/types/params.go index 6491372a3a..595bfda1d1 100644 --- a/x/slashing/types/params.go +++ b/x/slashing/types/params.go @@ -147,7 +147,7 @@ func validateSlashFractionDowntime(i interface{}) error { return nil } -// return min signed per window as an integer (vs the decimal in the param) +// MinSignedPerWindowInt returns min signed per window as an integer (vs the decimal in the param) func (p *Params) MinSignedPerWindowInt() int64 { signedBlocksWindow := p.SignedBlocksWindow minSignedPerWindow := p.MinSignedPerWindow