fn validate_value(&self, value: &StoredValue) -> Result<(), Error> {
        match value {
            StoredValue::CLValue(cl_value) => self.validate_cl_value(cl_value),
            StoredValue::Account(account) => {
                // This should never happen as accounts can't be created by contracts.
                // I am putting this here for the sake of completeness.
                account
                    .named_keys()
                    .values()
                    .try_for_each(|key| self.validate_key(key))
            }
            StoredValue::ContractWasm(_) => Ok(()),
            StoredValue::Contract(contract_header) => contract_header
                .named_keys()
                .values()
                .try_for_each(|key| self.validate_key(key)),
            // TODO: anything to validate here?
            StoredValue::ContractPackage(_) => Ok(()),
            StoredValue::Transfer(_) => Ok(()),
            StoredValue::DeployInfo(_) => Ok(()),
            StoredValue::EraInfo(_) => Ok(()),
            StoredValue::Bid(_) => Ok(()),
            StoredValue::Withdraw(_) => Ok(()),
        }
    }
/// Validates whether keys used in the `value` are not forged.
Validates whether keys used in the `value` are not forged.
Validates whether keys used in the ` value ` are not forged .
fn validate_value(&self, value: &StoredValue) -> Result<(), Error> {
        match value {
            StoredValue::CLValue(cl_value) => self.validate_cl_value(cl_value),
            StoredValue::Account(account) => {
                // This should never happen as accounts can't be created by contracts.
                // I am putting this here for the sake of completeness.
                account
                    .named_keys()
                    .values()
                    .try_for_each(|key| self.validate_key(key))
            }
            StoredValue::ContractWasm(_) => Ok(()),
            StoredValue::Contract(contract_header) => contract_header
                .named_keys()
                .values()
                .try_for_each(|key| self.validate_key(key)),
            // TODO: anything to validate here?
            StoredValue::ContractPackage(_) => Ok(()),
            StoredValue::Transfer(_) => Ok(()),
            StoredValue::DeployInfo(_) => Ok(()),
            StoredValue::EraInfo(_) => Ok(()),
            StoredValue::Bid(_) => Ok(()),
            StoredValue::Withdraw(_) => Ok(()),
        }
    }
fn validate_value ( & self , value : & StoredValue ) -> Result < ( ) , Error > { match value { StoredValue :: CLValue ( cl_value ) => self . validate_cl_value ( cl_value ) , StoredValue :: Account ( account ) => { // This should never happen as accounts can't be created by contracts. // I am putting this here for the sake of completeness. account . named_keys ( ) . values ( ) . try_for_each ( | key | self . validate_key ( key ) ) } StoredValue :: ContractWasm ( _ ) => Ok ( ( ) ) , StoredValue :: Contract ( contract_header ) => contract_header . named_keys ( ) . values ( ) . try_for_each ( | key | self . validate_key ( key ) ) , // TODO: anything to validate here? StoredValue :: ContractPackage ( _ ) => Ok ( ( ) ) , StoredValue :: Transfer ( _ ) => Ok ( ( ) ) , StoredValue :: DeployInfo ( _ ) => Ok ( ( ) ) , StoredValue :: EraInfo ( _ ) => Ok ( ( ) ) , StoredValue :: Bid ( _ ) => Ok ( ( ) ) , StoredValue :: Withdraw ( _ ) => Ok ( ( ) ) , } }
Validates whether keys used in the `value` are not forged.
Validates whether keys used in the ` value ` are not forged .
&self
value
&StoredValue
&self
value
&StoredValue