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=refs%2Fheads%2F2018-03-fixups;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,