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

lightningd: always broadcast the latest close tx #3556

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

vasild
Copy link
Contributor

@vasild vasild commented Feb 28, 2020

Before this patch we would only update channel->last_tx with the newly
proposed closure tx from the peer if the fee of the new one was lower.

In negotiations where we are at the higher end and the peer starts
lower, all peer's subsequent proposals will be higher than his initial
proposal and in this case we would never update channel->last_tx and
would wrongly broadcast his initial proposal at the end of the
negotiation.

Fixes #3549

Changelog-Fixed: Always broadcast the latest close tx at the end of the close fee negotiation, instead of sometimes broadcasting the peer's initial proposal.

Copy link
Collaborator

@ZmnSCPxj ZmnSCPxj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 147ba83

@vasild vasild force-pushed the close_tx_broadcast branch 4 times, most recently from 22b6c6e to b4d0e3b Compare March 6, 2020 19:19
Before this patch we would only update `channel->last_tx` with the newly
proposed closure tx from the peer if the fee of the new one was lower.

In negotiations where we are at the higher end and the peer starts
lower, all peer's subsequent proposals will be higher than his initial
proposal and in this case we would never update `channel->last_tx`
and would wrongly broadcast his initial proposal at the end of the
negotiation.

Fixes ElementsProject#3549

Changelog-Fixed: Always broadcast the latest close transaction at the end of the close fee negotiation, instead of sometimes broadcasting the peer's initial closing proposal.
@rustyrussell rustyrussell merged commit 66eca2f into ElementsProject:master Mar 10, 2020
@vasild vasild deleted the close_tx_broadcast branch March 10, 2020 06:57
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.

During close sometimes a node would broadcast the wrong transaction
3 participants