From 70bed378df3b16e464f2d9903c4d3ac73420c490 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Wed, 22 Jan 2020 13:53:12 -0500 Subject: [PATCH] Fix spurious calls of broadcast_by_local_state --- lightning/src/ln/channelmonitor.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 { .. } => { } } -- 2.39.5