types: sort validators by voting power

thus enabling faster commit verification assuming non uniform distribution of power.

Closes #2478

spec: https://github.com/tendermint/spec/pull/91
This commit is contained in:
Anton Kaliaev
2020-05-06 11:37:36 +04:00
committed by GitHub
parent f6435f2c73
commit 25890a6635
7 changed files with 134 additions and 100 deletions

View File

@@ -78,7 +78,7 @@ func (pkz privKeys) signHeader(header *types.Header, first, last int) *types.Com
}
// We need this list to keep the ordering.
vset := pkz.ToValidators(1, 0)
vset := pkz.ToValidators(1, 1)
blockID := types.BlockID{
Hash: header.Hash(),