Skip to content

Prevent Electrum updates during shutdown - #1054

Merged
tankyleo merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-08-electrum-shutdown-safety
Aug 20, 2026
Merged

Prevent Electrum updates during shutdown#1054
tankyleo merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-08-electrum-shutdown-safety

Conversation

@tnull

@tnull tnull commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Based on #997 for now, will rebase once that's merged.

A timed-out synchronous Electrum sync can outlive its driving task
and continue calling Confirm implementations while node shutdown is
draining persistence work.

Close a gate before task cancellation so no new callbacks can start.
Let callbacks already in progress finish atomically before shutdown
continues.

@tnull
tnull requested a review from tankyleo August 18, 2026 11:04
@ldk-reviews-bot

ldk-reviews-bot commented Aug 18, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tankyleo as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tankyleo

Copy link
Copy Markdown
Contributor

Needs rebase

A timed-out synchronous Electrum sync can outlive its driving task
and continue calling Confirm implementations while node shutdown is
draining persistence work.

Close a gate before task cancellation so no new callbacks can start.
Let callbacks already in progress finish atomically before shutdown
continues.

Co-Authored-By: HAL 9000
@tnull
tnull force-pushed the 2026-08-electrum-shutdown-safety branch from d392a8b to 3e40819 Compare August 19, 2026 06:19
@tnull

tnull commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

Needs rebase

Rebased.

@tankyleo tankyleo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CI failure looks unrelated, I pushed #1063 that should fix it.

@tankyleo
tankyleo merged commit a3bb903 into lightningdevkit:main Aug 20, 2026
24 of 25 checks passed
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