Skip to content

Add flag to disable broadcasting when it's dangerous due to information loss#1593

Closed
QPotato wants to merge 10 commits intolightningdevkit:mainfrom
QPotato:track_should_broadcast
Closed

Add flag to disable broadcasting when it's dangerous due to information loss#1593
QPotato wants to merge 10 commits intolightningdevkit:mainfrom
QPotato:track_should_broadcast

Conversation

@QPotato
Copy link
Copy Markdown

@QPotato QPotato commented Jul 4, 2022

Work in progress PR. The functionality should be ready, but I'm still figuring out how to write tests for this. I'm opening the PR to run CI and use it as reference to ask questions about the tests on the issue.

This PR adds a new field to ChannelMonitor to track when a channel was force closed with should_broadcast: false. We then use this flag to disabled automatic braodcasting of the latest holder commitment transaction in cases where doing so could be dangerous due to missing information. In particular, adding this solves the case where the transaction would have been broadcast on deserialization of the monitor.

I also fixed some minor typos I found on docstrings while reading through the code.

Closes #1563

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't Always Broadcast latest state on startup if we'd previously closed-without-broadcast

2 participants