Skip to content
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

fix: channel closer on unilateral to remote #4198

Merged
merged 4 commits into from
Nov 13, 2020

Conversation

m-schmoock
Copy link
Collaborator

Currently we set the lightning-cli listpeers channel closer to null if we have been offline and detected a force closed channel on us. This was because in theory it could have been ourself that used some scratching/recovery script for our private keys. Since this is topmost unlikely scenario, especially since someone doing this would certainly not fire up the daemon again and expect it to do something useful, we are better of to set the closer to remote as it should be.

@jsarenik
Copy link
Collaborator

Sounds reasonable. What do you mean by "scratching/recovery script"? Example?

@m-schmoock
Copy link
Collaborator Author

Sounds reasonable. What do you mean by "scratching/recovery script"? Example?

Nothing that I specifically know of, but its something that I can imagine users will come up to check for unclaimed funds in an old backup or something.

@m-schmoock m-schmoock force-pushed the fix/closer_unilateral branch 3 times, most recently from 4ab988d to 915323c Compare November 12, 2020 22:48
@m-schmoock
Copy link
Collaborator Author

Hopefully the test is now stable ...

tests/test_connection.py Outdated Show resolved Hide resolved
@niftynei
Copy link
Collaborator

Reasonable. If someone's going to all the work to close a channel out-of-band, that definitely counts as remote. For what it's worth, we know definitively who did it in onchaind.

Incase we have been offline while a channel was force closed on us we
now set the 'closer' to 'remote' instead of null because this is by far
the most probable reason.

Changelog-None
@cdecker
Copy link
Member

cdecker commented Nov 13, 2020

ACK 47415ca

@niftynei niftynei merged commit 183f769 into ElementsProject:master Nov 13, 2020
@m-schmoock m-schmoock deleted the fix/closer_unilateral branch November 14, 2020 11:26
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.

4 participants