(i, j int)
| 752 | func (valz ValidatorsByVotingPower) Len() int { return len(valz) } |
| 753 | |
| 754 | func (valz ValidatorsByVotingPower) Less(i, j int) bool { |
| 755 | if valz[i].VotingPower == valz[j].VotingPower { |
| 756 | return bytes.Compare(valz[i].Address, valz[j].Address) == -1 |
| 757 | } |
| 758 | return valz[i].VotingPower > valz[j].VotingPower |
| 759 | } |
| 760 | |
| 761 | func (valz ValidatorsByVotingPower) Swap(i, j int) { |
| 762 | valz[i], valz[j] = valz[j], valz[i] |