Skip to content

Commit 93f47f5

Browse files
committed
Fix double-locking in channelmanager
1 parent 7bb290f commit 93f47f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ln/channelmanager.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ impl ChannelManager {
772772
if from_user {
773773
panic!("Called claim_funds with a preimage for an outgoing payment. There is nothing we can do with this, and something is seriously wrong if you knew this...");
774774
}
775+
mem::drop(channel_state);
775776
let mut pending_events = self.pending_events.lock().unwrap();
776777
pending_events.push(events::Event::PaymentSent {
777778
payment_preimage
@@ -795,6 +796,7 @@ impl ChannelManager {
795796
}
796797
};
797798

799+
mem::drop(channel_state);
798800
let mut pending_events = self.pending_events.lock().unwrap();
799801
pending_events.push(events::Event::SendFulfillHTLC {
800802
node_id: node_id,

0 commit comments

Comments
 (0)