From: Antoine Riard Date: Wed, 22 Jan 2020 18:53:12 +0000 (-0500) Subject: Fix spurious calls of broadcast_by_local_state X-Git-Tag: v0.0.12~152^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=70bed378df3b16e464f2d9903c4d3ac73420c490;p=rust-lightning Fix spurious calls of broadcast_by_local_state --- diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index b9527f599..66e73a22d 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -2220,7 +2220,8 @@ impl ChannelMonitor { assert!(local_tx.tx.has_local_sig()); match self.key_storage { Storage::Local { ref delayed_payment_base_key, .. } => { - append_onchain_update!(self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height)); + let mut res = self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height); + append_onchain_update!(res); }, Storage::Watchtower { .. } => { } } @@ -2243,7 +2244,8 @@ impl ChannelMonitor { assert!(local_tx.tx.has_local_sig()); match self.key_storage { Storage::Local { ref delayed_payment_base_key, .. } => { - append_onchain_update!(self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height)); + let mut res = self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height); + append_onchain_update!(res); }, Storage::Watchtower { .. } => { } }