Skip to content

Commit

Permalink
fix(baseapp): sort res.Validators before comparing in InitChain (#22757)
Browse files Browse the repository at this point in the history
(cherry picked from commit 92ddbf7)
  • Loading branch information
damiannolan authored and mergify[bot] committed Dec 4, 2024
1 parent 61865a6 commit e6ccafb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func (app *BaseApp) InitChain(req *abci.InitChainRequest) (*abci.InitChainRespon
}

sort.Sort(abcitypes.ValidatorUpdates(req.Validators))
sort.Sort(abcitypes.ValidatorUpdates(res.Validators))

for i := range res.Validators {
if !proto.Equal(&res.Validators[i], &req.Validators[i]) {
Expand Down

0 comments on commit e6ccafb

Please sign in to comment.