From: Matt Corallo Date: Sun, 25 Mar 2018 19:48:41 +0000 (-0400) Subject: Fix double-locking in channelmanager X-Git-Tag: v0.0.12~416^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=93f47f542183fb44679ca029a822a87102591bbe;p=rust-lightning Fix double-locking in channelmanager --- diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index d7bd9ff9d..ff6f924c6 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -772,6 +772,7 @@ impl ChannelManager { if from_user { 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..."); } + mem::drop(channel_state); let mut pending_events = self.pending_events.lock().unwrap(); pending_events.push(events::Event::PaymentSent { payment_preimage @@ -795,6 +796,7 @@ impl ChannelManager { } }; + mem::drop(channel_state); let mut pending_events = self.pending_events.lock().unwrap(); pending_events.push(events::Event::SendFulfillHTLC { node_id: node_id,