fn activate_bid(&mut self, validator_public_key: PublicKey) -> Result<(), Error> {
        let provided_account_hash =
            AccountHash::from_public_key(&validator_public_key, |x| self.blake2b(x));

        if !self.is_allowed_session_caller(&provided_account_hash) {
            return Err(Error::InvalidContext);
        }

        let mut bid = match self.read_bid(&provided_account_hash)? {
            Some(bid) => bid,
            None => return Err(Error::ValidatorNotFound),
        };

        bid.activate();

        self.write_bid(provided_account_hash, bid)?;

        Ok(())
    }
/// Activates a given validator's bid.  To be used when a validator has been marked as inactive
/// by consensus (aka "evicted").
Activates a given validator's bid.  To be used when a validator has been marked as inactive
by consensus (aka "evicted").
Activates a given validator ' s bid . To be used when a validator has been marked as inactive by consensus ( aka " evicted " ) .
fn activate_bid(&mut self, validator_public_key: PublicKey) -> Result<(), Error> {
        let provided_account_hash =
            AccountHash::from_public_key(&validator_public_key, |x| self.blake2b(x));
        if !self.is_allowed_session_caller(&provided_account_hash) {
            return Err(Error::InvalidContext);
        }
        let mut bid = match self.read_bid(&provided_account_hash)? {
            Some(bid) => bid,
            None => return Err(Error::ValidatorNotFound),
        };
        bid.activate();
        self.write_bid(provided_account_hash, bid)?;
        Ok(())
    }
fn activate_bid ( & mut self , validator_public_key : PublicKey ) -> Result < ( ) , Error > { let provided_account_hash = AccountHash :: from_public_key ( & validator_public_key , | x | self . blake2b ( x ) ) ; if ! self . is_allowed_session_caller ( & provided_account_hash ) { return Err ( Error :: InvalidContext ) ; } let mut bid = match self . read_bid ( & provided_account_hash ) ? { Some ( bid ) => bid , None => return Err ( Error :: ValidatorNotFound ) , } ; bid . activate ( ) ; self . write_bid ( provided_account_hash , bid ) ? ; Ok ( ( ) ) }
Activates a given validator's bid.
Activates a given validator ' s bid .
&mut self
validator_public_key
PublicKey
&mut self
validator_public_key
PublicKey