From d9cc69ae17abd043e03a01ecb06899457f9f5db1 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 14 Oct 2024 15:49:43 +0200 Subject: [PATCH] WIP Solve `sync_wallets` --- src/lib.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 42b99406a..3ab69099e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1209,10 +1209,17 @@ impl Node { tokio::task::block_in_place(move || { tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap().block_on( async move { - chain_source.update_fee_rate_estimates().await?; - chain_source.sync_lightning_wallet(sync_cman, sync_cmon, sync_sweeper).await?; - chain_source.sync_onchain_wallet().await?; - Ok(()) + if matches!(*self.chain_source, ChainSource::BitcoindRpc { .. }) { + tokio::time::sleep(std::time::Duration::from_secs(10)).await; + return Ok(()); + } else { + chain_source.update_fee_rate_estimates().await?; + chain_source + .sync_lightning_wallet(sync_cman, sync_cmon, sync_sweeper) + .await?; + chain_source.sync_onchain_wallet().await?; + Ok(()) + } }, ) })