Browse Source

Merge pull request #1341 from EugeneChung/develop

Remove unnecessary bytes.Compare() call
pull/1336/head
Alexander Simmerl 7 years ago
committed by GitHub
parent
commit
79315efd1f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      types/validator.go

+ 3
- 2
types/validator.go View File

@ -45,9 +45,10 @@ func (v *Validator) CompareAccum(other *Validator) *Validator {
} else if v.Accum < other.Accum {
return other
} else {
if bytes.Compare(v.Address, other.Address) < 0 {
result := bytes.Compare(v.Address, other.Address)
if result < 0 {
return v
} else if bytes.Compare(v.Address, other.Address) > 0 {
} else if result > 0 {
return other
} else {
cmn.PanicSanity("Cannot compare identical validators")


Loading…
Cancel
Save