Esempio n. 1
0
 public int GetValidatorIndex(ECDSAPublicKey publicKey, long afterBlock)
 {
     return(GetValidatorsPublicKeys(afterBlock)
            .Select((key, index) => new { key, index })
            .Where(arg => publicKey.Equals(arg.key))
            .Select(arg => arg.index)
            .First());
 }
Esempio n. 2
0
 public int GetValidatorIndex(ECDSAPublicKey publicKey)
 {
     return(EcdsaPublicKeySet
            .Select((key, index) => new { key, index })
            .Where(arg => publicKey.Equals(arg.key))
            .Select(arg => arg.index)
            .DefaultIfEmpty(-1)
            .First());
 }