/// Persist the given CUP to disk.
///
/// This is necessary, as it allows the orchestrator to find a CUP
/// it previously downloaded again after restart, so that the node
/// manager never goes back in time.  It will always find a CUP
/// that is at least as high as the one it has previously
/// discovered.
///
/// Follows guidelines for DFINITY thread-safe I/O.
Persist the given CUP to disk.
This is necessary, as it allows the orchestrator to find a CUP
it previously downloaded again after restart, so that the node
manager never goes back in time.  It will always find a CUP
that is at least as high as the one it has previously
discovered.

Follows guidelines for DFINITY thread-safe I/O.
Persist the given CUP to disk . This is necessary as it allows the orchestrator to find a CUP it previously downloaded again after restart so that the node manager never goes back in time . It will always find a CUP that is at least as high as the one it has previously discovered . Follows guidelines for DFINITY thread - safe I / O .
pub(crate) fn persist_cup(&self, cup: &CUPWithOriginalProtobuf) -> OrchestratorResult<PathBuf> {
        let cup_file_path = self.get_cup_path();
        info!(
            self.logger,
            "Persisting CUP to file: {:?}, replica version={}, height={}",
            &cup_file_path,
            cup.cup.content.registry_version(),
            cup.cup.height()
        );
        write_protobuf_using_tmp_file(&cup_file_path, &cup.protobuf).map_err(|e| {
            OrchestratorError::IoError(
                format!("Failed to serialize protobuf to disk: {:?}", &cup_file_path),
                e,
            )
        })?;
        Ok(cup_file_path)
    }
pub ( crate ) fn persist_cup ( & self , cup : & CUPWithOriginalProtobuf ) -> OrchestratorResult < PathBuf > { let cup_file_path = self . get_cup_path ( ) ; info ! ( self logger " " cup_file_path cup cup content registry_version ( ) cup cup height ( ) ) ; write_protobuf_using_tmp_file ( & cup_file_path , & cup . protobuf ) . map_err ( | e | { OrchestratorError :: IoError ( format ! ( " " cup_file_path ) , e , ) } ) ? ; Ok ( cup_file_path ) }
Persist the given CUP to disk.
Persist the given CUP to disk .
&self
cup
&CUPWithOriginalProtobuf