Skip to content

Commit

Permalink
fix send lock usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedberg committed Nov 13, 2024
1 parent f96d343 commit 6472821
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ldk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 6472821

Please sign in to comment.