[quorum] return earlier idx if found in IndexOf

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3179/head v2.1.7
Leo Chen 4 years ago
parent c1f6051da6
commit 6b435a8dea
  1. 1
      consensus/quorum/quorum.go

@ -179,6 +179,7 @@ func (s *cIdentities) IndexOf(pubKey *bls.PublicKey) int {
for k, v := range s.publicKeys {
if v.IsEqual(pubKey) {
idx = k
break
}
}
return idx

Loading…
Cancel
Save