From 6472821fd9f94df4f7c0cc31ec9dd9709dfbdbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Wed, 13 Nov 2024 16:51:29 +0100 Subject: [PATCH] fix send lock usage --- src/ldk.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ldk.rs b/src/ldk.rs index cb8ef83..3d04b13 100644 --- a/src/ldk.rs +++ b/src/ldk.rs @@ -596,6 +596,7 @@ async fn handle_ldk_events( { tracing::error!( "ERROR: Channel went away before we could fund it. The peer disconnected or refused the channel."); + *unlocked_state.rgb_send_lock.lock().unwrap() = false; } } Event::PaymentClaimable { @@ -1015,6 +1016,10 @@ async fn handle_ldk_events( Event::DiscardFunding { channel_id, .. } => { // A "real" node should probably "lock" the UTXOs spent in funding transactions until // the funding transaction either confirms, or this event is generated. + tracing::info!( + "EVENT: Discarded funding for channel with ID {}", + channel_id + ); *unlocked_state.rgb_send_lock.lock().unwrap() = false;