/// Read the node public keys from local storage
Read the node public keys from local storage
Read the node public keys from local storage
pub fn read_node_public_keys(crypto_root: &Path) -> Result<NodePublicKeys, PublicKeyStoreError> {
    let pk_file = crypto_root.join(PK_DATA_FILENAME);
    match fs::read(pk_file) {
        Ok(data) => NodePublicKeys::decode(&*data)
            .map_err(|err| PublicKeyStoreError::ParsingError(err.to_string())),
        Err(err) => Err(PublicKeyStoreError::IOError(err.to_string())),
    }
}
pub fn read_node_public_keys ( crypto_root : & Path ) -> Result < NodePublicKeys , PublicKeyStoreError > { let pk_file = crypto_root . join ( PK_DATA_FILENAME ) ; match fs :: read ( pk_file ) { Ok ( data ) => NodePublicKeys :: decode ( & * data ) . map_err ( | err | PublicKeyStoreError :: ParsingError ( err . to_string ( ) ) ) , Err ( err ) => Err ( PublicKeyStoreError :: IOError ( err . to_string ( ) ) ) , } }
Read the node public keys from local storage
Read the node public keys from local storage
crypto_root
&Path