Commit fc57737
committed
Avoid repeated refreshes for persisted async invoices
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 Loupe1 parent c9260ee commit fc57737
2 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2450 | 2450 | | |
2451 | 2451 | | |
2452 | 2452 | | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2453 | 2472 | | |
2454 | 2473 | | |
2455 | 2474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| |||
0 commit comments