|
@ -6,6 +6,7 @@ import ( |
|
|
"errors" |
|
|
"errors" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"path/filepath" |
|
|
"path/filepath" |
|
|
|
|
|
"sort" |
|
|
"strconv" |
|
|
"strconv" |
|
|
|
|
|
|
|
|
"github.com/tendermint/tendermint/abci/example/code" |
|
|
"github.com/tendermint/tendermint/abci/example/code" |
|
@ -282,6 +283,14 @@ func (app *Application) validatorUpdates(height uint64) (abci.ValidatorUpdates, |
|
|
} |
|
|
} |
|
|
valUpdates = append(valUpdates, abci.UpdateValidator(keyBytes, int64(power), app.cfg.KeyType)) |
|
|
valUpdates = append(valUpdates, abci.UpdateValidator(keyBytes, int64(power), app.cfg.KeyType)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// the validator updates could be returned in arbitrary order,
|
|
|
|
|
|
// and that seems potentially bad. This orders the validator
|
|
|
|
|
|
// set.
|
|
|
|
|
|
sort.Slice(valUpdates, func(i, j int) bool { |
|
|
|
|
|
return valUpdates[i].PubKey.Compare(valUpdates[j].PubKey) < 0 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
return valUpdates, nil |
|
|
return valUpdates, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|