Skip to content

Commit 52e8f6f

Browse files
authored
Merge pull request #613 from tnull/2025-08-backports-for-0.6.2
Backports for 0.6.2
2 parents 201217f + 1a2d900 commit 52e8f6f

File tree

6 files changed

+184
-87
lines changed

6 files changed

+184
-87
lines changed

src/builder.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,12 +1495,16 @@ fn build_with_store_internal(
14951495
};
14961496

14971497
let (stop_sender, _) = tokio::sync::watch::channel(());
1498-
let (event_handling_stopped_sender, _) = tokio::sync::watch::channel(());
1498+
let background_processor_task = Mutex::new(None);
1499+
let background_tasks = Mutex::new(None);
1500+
let cancellable_background_tasks = Mutex::new(None);
14991501

15001502
Ok(Node {
15011503
runtime,
15021504
stop_sender,
1503-
event_handling_stopped_sender,
1505+
background_processor_task,
1506+
background_tasks,
1507+
cancellable_background_tasks,
15041508
config,
15051509
wallet,
15061510
chain_source,

src/chain/electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use std::time::{Duration, Instant};
4040

4141
const BDK_ELECTRUM_CLIENT_BATCH_SIZE: usize = 5;
4242
const ELECTRUM_CLIENT_NUM_RETRIES: u8 = 3;
43-
const ELECTRUM_CLIENT_TIMEOUT_SECS: u8 = 20;
43+
const ELECTRUM_CLIENT_TIMEOUT_SECS: u8 = 10;
4444

4545
pub(crate) struct ElectrumRuntimeClient {
4646
electrum_client: Arc<ElectrumClient>,

src/config.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,16 @@ pub(crate) const NODE_ANN_BCAST_INTERVAL: Duration = Duration::from_secs(60 * 60
6565
pub(crate) const WALLET_SYNC_INTERVAL_MINIMUM_SECS: u64 = 10;
6666

6767
// The timeout after which we abort a wallet syncing operation.
68-
pub(crate) const BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90;
68+
pub(crate) const BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 20;
6969

7070
// The timeout after which we abort a wallet syncing operation.
71-
pub(crate) const LDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 30;
71+
pub(crate) const LDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 10;
72+
73+
// The timeout after which we give up waiting on LDK's event handler to exit on shutdown.
74+
pub(crate) const LDK_EVENT_HANDLER_SHUTDOWN_TIMEOUT_SECS: u64 = 30;
75+
76+
// The timeout after which we give up waiting on a background task to exit on shutdown.
77+
pub(crate) const BACKGROUND_TASK_SHUTDOWN_TIMEOUT_SECS: u64 = 5;
7278

7379
// The timeout after which we abort a fee rate cache update operation.
7480
pub(crate) const FEE_RATE_CACHE_UPDATE_TIMEOUT_SECS: u64 = 5;

0 commit comments

Comments
 (0)