|
|
@ -72,7 +72,7 @@ type ParticipantTracker interface { |
|
|
|
Participants() multibls.PublicKeys |
|
|
|
Participants() multibls.PublicKeys |
|
|
|
IndexOf(bls.SerializedPublicKey) int |
|
|
|
IndexOf(bls.SerializedPublicKey) int |
|
|
|
ParticipantsCount() int64 |
|
|
|
ParticipantsCount() int64 |
|
|
|
NextAfter(*bls.PublicKeyWrapper, int) (bool, *bls.PublicKeyWrapper) |
|
|
|
NthNext(*bls.PublicKeyWrapper, int) (bool, *bls.PublicKeyWrapper) |
|
|
|
UpdateParticipants(pubKeys []bls.PublicKeyWrapper) |
|
|
|
UpdateParticipants(pubKeys []bls.PublicKeyWrapper) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -187,8 +187,8 @@ func (s *cIdentities) IndexOf(pubKey bls.SerializedPublicKey) int { |
|
|
|
return -1 |
|
|
|
return -1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// NextAfter return the next pubkey, next can be negative number
|
|
|
|
// NthNext return the Nth next pubkey, next can be negative number
|
|
|
|
func (s *cIdentities) NextAfter(pubKey *bls.PublicKeyWrapper, next int) (bool, *bls.PublicKeyWrapper) { |
|
|
|
func (s *cIdentities) NthNext(pubKey *bls.PublicKeyWrapper, next int) (bool, *bls.PublicKeyWrapper) { |
|
|
|
found := false |
|
|
|
found := false |
|
|
|
|
|
|
|
|
|
|
|
idx := s.IndexOf(pubKey.Bytes) |
|
|
|
idx := s.IndexOf(pubKey.Bytes) |
|
|
|