Skip to content

Commit 2eea2b3

Browse files
adapt to input
1 parent c1a7697 commit 2eea2b3

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/chain/mod.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,18 +212,16 @@ impl ChainSource {
212212
let onchain_wallet_sync_interval_secs = background_sync_config
213213
.onchain_wallet_sync_interval_secs
214214
.max(WALLET_SYNC_INTERVAL_MINIMUM_SECS);
215-
let mut onchain_wallet_sync_interval = tokio::time::interval(
216-
Duration::from_secs(onchain_wallet_sync_interval_secs),
217-
);
215+
let mut onchain_wallet_sync_interval =
216+
tokio::time::interval(Duration::from_secs(onchain_wallet_sync_interval_secs));
218217
onchain_wallet_sync_interval
219218
.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip);
220219

221220
let fee_rate_cache_update_interval_secs = background_sync_config
222221
.fee_rate_cache_update_interval_secs
223222
.max(WALLET_SYNC_INTERVAL_MINIMUM_SECS);
224-
let mut fee_rate_update_interval = tokio::time::interval(Duration::from_secs(
225-
fee_rate_cache_update_interval_secs,
226-
));
223+
let mut fee_rate_update_interval =
224+
tokio::time::interval(Duration::from_secs(fee_rate_cache_update_interval_secs));
227225
// When starting up, we just blocked on updating, so skip the first tick.
228226
fee_rate_update_interval.reset();
229227
fee_rate_update_interval
@@ -232,14 +230,13 @@ impl ChainSource {
232230
let lightning_wallet_sync_interval_secs = background_sync_config
233231
.lightning_wallet_sync_interval_secs
234232
.max(WALLET_SYNC_INTERVAL_MINIMUM_SECS);
235-
let mut lightning_wallet_sync_interval = tokio::time::interval(
236-
Duration::from_secs(lightning_wallet_sync_interval_secs),
237-
);
233+
let mut lightning_wallet_sync_interval =
234+
tokio::time::interval(Duration::from_secs(lightning_wallet_sync_interval_secs));
238235
lightning_wallet_sync_interval
239236
.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip);
240237

241238
// Start the syncing loop.
242-
loop {
239+
loop {
243240
tokio::select! {
244241
_ = stop_sync_receiver.changed() => {
245242
log_trace!(

src/config.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,10 @@ impl Default for BackgroundSyncConfig {
325325
/// `BackgroundSyncConfig`.
326326
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
327327
pub struct EsploraSyncConfig {
328-
/// Background sync configuration. If set to `None`, background syncing will be disabled.
329-
///
330-
/// Users will need to manually sync via `Node::sync_wallets` for the wallets and fee rate updates.
328+
/// Background sync configuration.
329+
///
330+
/// If set to `None`, background syncing will be disabled. Users will need to manually
331+
/// sync via `Node::sync_wallets` for the wallets and fee rate updates.
331332
///
332333
/// [`Node::sync_wallets`]: crate::Node::sync_wallets
333334
pub background_sync_config: Option<BackgroundSyncConfig>,

0 commit comments

Comments
 (0)