mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
Remove unnecessary bytes.Compare() call
This commit is contained in:
parent
5a51a0ba06
commit
a61130aebb
@ -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…
x
Reference in New Issue
Block a user