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 package splitting logic #3538

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

morehouse
Copy link
Contributor

When scanning confirmed transactions for spends that conflict with our existing packages, we should continue scanning after detecting the first conflicting package since a transaction can conflict with multiple packages.

This ensures that we remove all inputs from our packages that have already been spent by the counterparty so that valid claim transactions are generated.

Fixes #3537.

When scanning confirmed transactions for spends that conflict with our
existing packages, we should continue scanning after detecting the first
conflicting package since a transaction can conflict with multiple
packages.

This ensures that we remove *all* inputs from our packages that have
already been spent by the counterparty so that valid claim transactions
are generated.

Fixes lightningdevkit#3537.
@TheBlueMatt TheBlueMatt added this to the 0.1 milestone Jan 14, 2025
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Thanks so much!

// counterparty, even when the counterparty claims HTLCs from multiple packages in a single
// transaction.
//
// This is a regression test for https://github.com/lightningdevkit/rust-lightning/issues/3537.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: prefer to just write out the issue in the code. Eventually we may move off of github so easier to keep it all in one place.

@TheBlueMatt TheBlueMatt merged commit de7d756 into lightningdevkit:main Jan 15, 2025
25 checks passed
@TheBlueMatt TheBlueMatt mentioned this pull request Jan 15, 2025
@morehouse morehouse deleted the fix_package_splitting branch January 15, 2025 14:23
@TheBlueMatt
Copy link
Collaborator

Backported in #3536.

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.

Package splitting should continue after first conflict
3 participants