Skip to content

Commit 06d6e2f

Browse files
committed
Hold on-chain rebalance mutex guard
1 parent a346206 commit 06d6e2f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

graduated-rebalancer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ license = "MIT OR Apache-2.0"
1010
bitcoin-payment-instructions = { workspace = true }
1111
lightning = { workspace = true }
1212
lightning-invoice = { workspace = true }
13-
tokio = { version = "1", default-features = false }
13+
tokio = { version = "1", default-features = false, features = ["sync"] }

graduated-rebalancer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ where
341341

342342
/// Perform on-chain to lightning rebalance by opening a channel or splicing into an existing one
343343
async fn do_onchain_rebalance(&self, params: TriggerParams) {
344-
let _ = self.balance_mutex.lock().await;
344+
let _lock = self.balance_mutex.lock().await;
345345

346346
let (channel_outpoint, user_channel_id) = if self.ln_wallet.has_channel_with_lsp() {
347347
log_info!(self.logger, "Splicing into channel with LSP with on-chain funds");

0 commit comments

Comments
 (0)