Co-authored-by: Naveen <70747893+knkcse@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
This commit is contained in:
parent
8087ca63da
commit
6854ec67f0
@ -51,6 +51,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* (x/distribution) [#23934](https://github.com/cosmos/cosmos-sdk/pull/23934) Fix vulnerability in `incrementReferenceCount` in distribution.
|
||||
* (baseapp) [#23879](https://github.com/cosmos/cosmos-sdk/pull/23879) Ensure finalize block response is not empty in the defer check of FinalizeBlock to avoid panic by nil pointer.
|
||||
* (query) [#23883](https://github.com/cosmos/cosmos-sdk/pull/23883) Fix NPE in query pagination.
|
||||
* (client) [#23860](https://github.com/cosmos/cosmos-sdk/pull/23860) Add missing `unordered` field for legacy amino signing of tx body.
|
||||
|
||||
@ -122,10 +122,12 @@ func (k Keeper) incrementReferenceCount(ctx context.Context, valAddr sdk.ValAddr
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
historical.ReferenceCount++
|
||||
if historical.ReferenceCount > 2 {
|
||||
panic("reference count should never exceed 2")
|
||||
}
|
||||
historical.ReferenceCount++
|
||||
|
||||
return k.SetValidatorHistoricalRewards(ctx, valAddr, period, historical)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user