Function enforce_protocol_recommendations

Source
pub(crate) fn enforce_protocol_recommendations<R, F, Fut>(
    runtime: &R,
    netdir_provider: Arc<dyn DirProvider>,
    software_publication_time: SystemTime,
    software_protocols: Protocols,
    override_status: Arc<MutCfg<SoftwareStatusOverrideConfig>>,
    on_fatal: F,
) -> Result<(), ErrorDetail>
where R: Runtime, F: FnOnce(ErrorDetail) -> Fut + Send + 'static, Fut: Future<Output = ()> + Send + 'static,
Expand description

Check whether we have any cached protocol recommendations, and report about them or enforce them immediately.

Then, launch a task to run indefinitely, and continue to enforce protocol recommendations. If that task encounters a fatal error, it should invoke on_fatal.