pub async fn run(self, mut stop_receiver: watch::Receiver<bool>) -> anyhow::Result<()> {
        let db = tokio::select! {
            db_result = create_readonly_db(self.config) => db_result?,
            _ = stop_receiver.changed() => return Ok(()),
        };
        let reader = AsyncTreeReader::new(db, MerkleTreeMode::Lightweight)?;
        self.tree_reader.send_replace(Some(reader));
        Ok(())
    }
Runs this task. The task exits on error, or when the tree reader is successfully initialized.
core/node/metadata_calculator/src/lib.rs