Skip to content

sweepbatcher: filter batches by signing mode - #1233

Merged
bhandras merged 1 commit into
lightninglabs:masterfrom
starius:sweepbatcher-filter-batches-selection
Sep 18, 2026
Merged

bhandras merged 1 commit into
lightninglabs:masterfrom
starius:sweepbatcher-filter-batches-selection

Conversation

@starius

@starius starius commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Standard clients can leave regular Loop In HTLC sweeps and presigned static-address sweeps pending at the same time. Fee-only selection offers sweeps to incompatible batches, producing warnings before retrying a compatible batch.

Filter incompatible signing modes in both greedy selection and its fallback. Keep the admission warnings as safeguards.

Add regression coverage for both mismatch directions through both selection paths. All four cases emit the original warnings without the fix. Manual regtest swaps reproduce both warnings on the old server and complete without either warning with this change.

Pull Request Checklist

  • Add an entry to docs/release-notes/release-notes-next.md, or apply the
    no-changelog label (required by CI)

Standard clients can leave regular Loop In HTLC sweeps and presigned
static-address sweeps pending at the same time. Fee-only selection
offers sweeps to incompatible batches, producing warnings before
retrying a compatible batch.

Filter incompatible signing modes in both greedy selection and its
fallback. Keep the admission warnings as safeguards.

Add regression coverage for both mismatch directions through both
selection paths. All four cases emit the original warnings without the
fix. Manual regtest swaps reproduce both warnings on the old server and
complete without either warning with this change.
@starius
starius marked this pull request as ready for review September 18, 2026 06:24
@starius
starius requested a review from hieblmi September 18, 2026 06:25

@hieblmi hieblmi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the fix, this looks good to me!


// Admission keeps every sweep in a batch in the same signing mode.
for _, sweep := range b.sweeps {
return sweep.presigned == presigned

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ah ok, this expects every sweep in the sweeps to have the same mode.

@bhandras
bhandras merged commit 4157016 into lightninglabs:master Sep 18, 2026
12 checks passed
@starius
starius deleted the sweepbatcher-filter-batches-selection branch September 18, 2026 16:15
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.

3 participants