From 3642d3a853ef6cc60a52838a0c70e3235bdc52ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Mon, 1 Jan 2024 15:38:08 +0100 Subject: [PATCH] Less confusing logs --- src/commands/listen_sync.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/listen_sync.rs b/src/commands/listen_sync.rs index 0a18283..a31bb32 100644 --- a/src/commands/listen_sync.rs +++ b/src/commands/listen_sync.rs @@ -208,13 +208,15 @@ pub async fn sync(ticket: String) -> Result<()> { let mut last_response = None; loop { + let req = car_mirror::pull::request(root, last_response, &config, &store, &cache).await?; + let dag_verification = IncrementalDagVerification::new([root], &store, &cache).await?; tracing::info!( num_blocks_want = dag_verification.want_cids.len(), num_blocks_have = dag_verification.have_cids.len(), "State of transfer" ); - let req = car_mirror::pull::request(root, last_response, &config, &store, &cache).await?; + if req.indicates_finished() { println!("Done!"); store.inner.put(PRIVATE_ACCESS_KEY, &access_key_bytes)?;