Skip to content

Fix spurious calls of broadcast_by_local_state #457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lightning/src/ln/channelmonitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { .. } => { }
}
Expand All @@ -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 { .. } => { }
}
Expand Down