Skip to content

Commit

Permalink
fix: sort res.Validators before comparing in InitChain
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Dec 4, 2024
1 parent eb3bf8b commit 8c76c40
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 8c76c40

Please sign in to comment.