Skip to content

Avoid repeated refreshes for persisted async invoices#4672

Open
tnull wants to merge 1 commit into
lightningdevkit:mainfrom
tnull:2026-06-used-offer-invoice-refresh
Open

Avoid repeated refreshes for persisted async invoices#4672
tnull wants to merge 1 commit into
lightningdevkit:mainfrom
tnull:2026-06-used-offer-invoice-refresh

Conversation

@tnull

@tnull tnull commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

When a used async receive offer's refreshed static invoice is persisted, advance the recorded invoice creation time. This keeps the refresh threshold anchored to the newest invoice instead of making the offer look stale on every timer tick.

Add coverage that a used offer does not enqueue another ServeStaticInvoice immediately after the server confirms the refresh.

Co-Authored-By: HAL 9000

This finding was discovered by Project Loupe

When a used async receive offer's refreshed static invoice is persisted,
advance the recorded invoice creation time. This keeps the refresh
threshold anchored to the newest invoice instead of making the offer
look stale on every timer tick.

Add coverage that a used offer does not enqueue another
ServeStaticInvoice immediately after the server confirms the refresh.

Co-Authored-By: HAL 9000

This finding was discovered by Project Loupe
@tnull tnull requested a review from valentinewallace June 10, 2026 11:39
@ldk-reviews-bot

ldk-reviews-bot commented Jun 10, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @valentinewallace 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.

@ldk-claude-review-bot

ldk-claude-review-bot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Based on my prior review and memory notes, this PR is a correct one-line minmax fix with appropriate test coverage. I've re-examined the diff and found nothing new.

No issues found.

@tnull tnull self-assigned this Jun 11, 2026
@tnull tnull moved this to Goal: Merge in Weekly Goals Jun 11, 2026
@tnull tnull force-pushed the 2026-06-used-offer-invoice-refresh branch from fc57737 to c6f4d8f Compare June 11, 2026 16:42
@tnull

tnull commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Updated to line-wrap commit messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Goal: Merge

Development

Successfully merging this pull request may close these issues.

3 participants