Skip to content

Commit 9a02115

Browse files
authored
Merge pull request #457 from ariard/2020-01-fix-append-onchain
Fix spurious calls of broadcast_by_local_state
2 parents c991643 + 70bed37 commit 9a02115

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/ln/channelmonitor.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,8 @@ impl ChannelMonitor {
22192219
assert!(local_tx.tx.has_local_sig());
22202220
match self.key_storage {
22212221
Storage::Local { ref delayed_payment_base_key, .. } => {
2222-
append_onchain_update!(self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height));
2222+
let mut res = self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height);
2223+
append_onchain_update!(res);
22232224
},
22242225
Storage::Watchtower { .. } => { }
22252226
}
@@ -2242,7 +2243,8 @@ impl ChannelMonitor {
22422243
assert!(local_tx.tx.has_local_sig());
22432244
match self.key_storage {
22442245
Storage::Local { ref delayed_payment_base_key, .. } => {
2245-
append_onchain_update!(self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height));
2246+
let mut res = self.broadcast_by_local_state(local_tx, delayed_payment_base_key, height);
2247+
append_onchain_update!(res);
22462248
},
22472249
Storage::Watchtower { .. } => { }
22482250
}

0 commit comments

Comments
 (0)