pub fn evaluate_status(&mut self) -> Result<Action, Error> {
        self.ensure_timestamp_progress()?;

        // If this is inconsistent, then we are waiting on a reconfiguration...
        if let Err(Error::ConfigInfoKeyMismatch(..)) = self.compare_info_to_config() {
            COUNTERS.waiting_on_consensus_reconfiguration.inc();
            return Ok(Action::NoAction);
        }

        let last_rotation = self.last_rotation()?;

        // If this is inconsistent, then the transaction either failed or was never submitted.
        if let Err(Error::ConfigStorageKeyMismatch(..)) = self.compare_storage_to_config() {
            return if last_rotation + self.txn_expiration_secs <= self.time_service.now() {
                Ok(Action::SubmitKeyRotationTransaction)
            } else {
                Ok(Action::NoAction)
            };
        }

        if last_rotation + self.rotation_period_secs <= self.time_service.now() {
            Ok(Action::FullKeyRotation)
        } else {
            Ok(Action::NoAction)
        }
    }
/// Evaluates the current status of the key manager by performing various state checks between
/// secure storage and the blockchain.
///
/// Note: every time this function is called, the libra_timestamp registered on-chain must be
/// strictly monotonically increasing. This helps to ensure that the blockchain is making
/// progress. Otherwise, if no progress is being made on-chain, a reconfiguration event is
/// unlikely, and the key manager will be unable to rotate keys.
Evaluates the current status of the key manager by performing various state checks between
secure storage and the blockchain.

every time this function is called, the libra_timestamp registered on-chain must be
strictly monotonically increasing. This helps to ensure that the blockchain is making
progress. Otherwise, if no progress is being made on-chain, a reconfiguration event is
unlikely, and the key manager will be unable to rotate keys.
Evaluates the current status of the key manager by performing various state checks between secure storage and the blockchain . every time this function is called the libra_timestamp registered on - chain must be strictly monotonically increasing . This helps to ensure that the blockchain is making progress . Otherwise if no progress is being made on - chain a reconfiguration event is unlikely and the key manager will be unable to rotate keys .
pub fn evaluate_status(&mut self) -> Result<Action, Error> {
        self.ensure_timestamp_progress()?;
        // If this is inconsistent, then we are waiting on a reconfiguration...
        if let Err(Error::ConfigInfoKeyMismatch(..)) = self.compare_info_to_config() {
            COUNTERS.waiting_on_consensus_reconfiguration.inc();
            return Ok(Action::NoAction);
        }
        let last_rotation = self.last_rotation()?;
        // If this is inconsistent, then the transaction either failed or was never submitted.
        if let Err(Error::ConfigStorageKeyMismatch(..)) = self.compare_storage_to_config() {
            return if last_rotation + self.txn_expiration_secs <= self.time_service.now() {
                Ok(Action::SubmitKeyRotationTransaction)
            } else {
                Ok(Action::NoAction)
            };
        }
        if last_rotation + self.rotation_period_secs <= self.time_service.now() {
            Ok(Action::FullKeyRotation)
        } else {
            Ok(Action::NoAction)
        }
    }
pub fn evaluate_status ( & mut self ) -> Result < Action , Error > { self . ensure_timestamp_progress ( ) ? ; // If this is inconsistent, then we are waiting on a reconfiguration... if let Err ( Error :: ConfigInfoKeyMismatch ( .. ) ) = self . compare_info_to_config ( ) { COUNTERS . waiting_on_consensus_reconfiguration . inc ( ) ; return Ok ( Action :: NoAction ) ; } let last_rotation = self . last_rotation ( ) ? ; // If this is inconsistent, then the transaction either failed or was never submitted. if let Err ( Error :: ConfigStorageKeyMismatch ( .. ) ) = self . compare_storage_to_config ( ) { return if last_rotation + self . txn_expiration_secs <= self . time_service . now ( ) { Ok ( Action :: SubmitKeyRotationTransaction ) } else { Ok ( Action :: NoAction ) } ; } if last_rotation + self . rotation_period_secs <= self . time_service . now ( ) { Ok ( Action :: FullKeyRotation ) } else { Ok ( Action :: NoAction ) } }
Evaluates the current status of the key manager by performing various state checks between
secure storage and the blockchain.
Evaluates the current status of the key manager by performing various state checks between secure storage and the blockchain .
&mut self
&mut self