pub async fn wait_for_persistence(self) -> anyhow::Result<()> {
        let tree = self.inner.expect(Self::INCONSISTENT_MSG);
        tokio::task::spawn_blocking(|| tree.wait_for_persistence())
            .await
            .context("panicked while waiting for pending recovery chunks to be persisted")?
    }
Waits until all pending chunks are persisted.
core/node/metadata_calculator/src/helpers.rs