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
  • Loading branch information
damiannolan authored Dec 4, 2024
1 parent eb3bf8b commit 92ddbf7
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 92ddbf7

Please sign in to comment.