pub async fn run(
        mut self,
        stop_receiver: watch::Receiver<bool>,
    ) -> Result<Infallible, OrStopped<Error>> {
        self.event_handler.initialize();
        // `unwrap_err()` is safe: `run_inner()` can only return `Ok(())` if `stop_after_success` is set.
        let err = self.run_inner(false, stop_receiver).await.unwrap_err();
        if matches!(&err, OrStopped::Stopped) {
            self.event_handler.start_shutting_down();
            tracing::info!("Shutting down reorg detector");
        }
        Err(err)
    }
Runs this detector continuously checking for a reorg until a fatal error occurs (including if a reorg is detected),
or a stop request is received.
core/node/reorg_detector/src/lib.rs