pub fn is_valid_validator(storage: &dyn Storage, validator_address: String) -> StdResult<bool> {
    let vec = to_vec(&validator_address)?;
    let res = ReadonlyPrefixedStorage::new(storage, VALIDATORS).get(&vec);
    match res {
        Some(_) => Ok(true),
        None => Ok(false),
    }
}
/// Check whether the validator is whitelisted.
Check whether the validator is whitelisted.
Check whether the validator is whitelisted .
pub fn is_valid_validator(storage: &dyn Storage, validator_address: String) -> StdResult<bool> {
    let vec = to_vec(&validator_address)?;
    let res = ReadonlyPrefixedStorage::new(storage, VALIDATORS).get(&vec);
    match res {
        Some(_) => Ok(true),
        None => Ok(false),
    }
}
pub fn is_valid_validator ( storage : & dyn Storage , validator_address : String ) -> StdResult < bool > { let vec = to_vec ( & validator_address ) ? ; let res = ReadonlyPrefixedStorage :: new ( storage , VALIDATORS ) . get ( & vec ) ; match res { Some ( _ ) => Ok ( true ) , None => Ok ( false ) , } }
Check whether the validator is whitelisted.
Check whether the validator is whitelisted .
storage
&dyn Storage
validator_address
String
storage
&dyn Storage
validator_address
String