From 10eb7aa17399aa8c369dd919bfa9d992f7329e4d Mon Sep 17 00:00:00 2001 From: ok300 <106775972+ok300@users.noreply.github.com> Date: Thu, 18 Apr 2024 05:51:21 +0000 Subject: [PATCH] Fix indentation in track_new_blocks (#935) --- libs/sdk-core/src/breez_services.rs | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/libs/sdk-core/src/breez_services.rs b/libs/sdk-core/src/breez_services.rs index b7238cf2d..17fb53504 100644 --- a/libs/sdk-core/src/breez_services.rs +++ b/libs/sdk-core/src/breez_services.rs @@ -1586,27 +1586,27 @@ impl BreezServices { interval.set_missed_tick_behavior(MissedTickBehavior::Skip); loop { tokio::select! { - _ = interval.tick() => { - let tip_res = cloned.chain_service.current_tip().await; - match tip_res { - Ok(next_block) => { - debug!("got tip {:?}", next_block); - if next_block > current_block { - _ = cloned.sync().await; - _ = cloned.on_event(BreezEvent::NewBlock{block: next_block}).await; + _ = interval.tick() => { + let tip_res = cloned.chain_service.current_tip().await; + match tip_res { + Ok(next_block) => { + debug!("got tip {:?}", next_block); + if next_block > current_block { + _ = cloned.sync().await; + _ = cloned.on_event(BreezEvent::NewBlock{block: next_block}).await; + } + current_block = next_block + }, + Err(e) => { + error!("failed to fetch next block {}", e) + } + }; } - current_block = next_block - }, - Err(e) => { - error!("failed to fetch next block {}", e) - } - }; - } - _ = shutdown_receiver.changed() => { - debug!("New blocks task has completed"); - return; - } + _ = shutdown_receiver.changed() => { + debug!("New blocks task has completed"); + return; + } } } });