pub fn update_pubkey_cache(&mut self) -> Result<(), Error> {
        for (i, validator) in self
            .validators
            .iter()
            .enumerate()
            .skip(self.pubkey_cache.len())
        {
            let success = self.pubkey_cache.insert(validator.pubkey, i);
            if !success {
                return Err(Error::PubkeyCacheInconsistent);
            }
        }

        Ok(())
    }
/// Updates the pubkey cache, if required.
///
/// Adds all `pubkeys` from the `validators` which are not already in the cache. Will
/// never re-add a pubkey.
Updates the pubkey cache, if required.
Adds all `pubkeys` from the `validators` which are not already in the cache. Will
never re-add a pubkey.
Updates the pubkey cache if required . Adds all ` pubkeys ` from the ` validators ` which are not already in the cache . Will never re - add a pubkey .
pub fn update_pubkey_cache(&mut self) -> Result<(), Error> {
        for (i, validator) in self
            .validators
            .iter()
            .enumerate()
            .skip(self.pubkey_cache.len())
        {
            let success = self.pubkey_cache.insert(validator.pubkey, i);
            if !success {
                return Err(Error::PubkeyCacheInconsistent);
            }
        }
        Ok(())
    }
pub fn update_pubkey_cache ( & mut self ) -> Result < ( ) , Error > { for ( i , validator ) in self . validators . iter ( ) . enumerate ( ) . skip ( self . pubkey_cache . len ( ) ) { let success = self . pubkey_cache . insert ( validator . pubkey , i ) ; if ! success { return Err ( Error :: PubkeyCacheInconsistent ) ; } } Ok ( ( ) ) }
Updates the pubkey cache, if required.
Updates the pubkey cache if required .
&mut self