Commit 7b2b62e
Don't prune
Previously, we would also prune any pending `GetInfo` or expired `Buy`
requests before we `persist`. This could have lead to races where we
drop a pending request and even remove the peer when calling `persist`.
Here, we simply split the pruning logic for the `pending_requests` and
expired JIT channel state, and only prune the latter before persisting.
This generally makes sense, as `pending_requests` isn't currently
persisted, so there is no need to prune before repersisting.
Both are however still pruned on peer disconnection.
Backport of 5f8c54apending_requests in persist
1 parent a61593a commit 7b2b62e
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
| 622 | + | |
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| 632 | + | |
632 | 633 | | |
| 634 | + | |
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
| |||
1871 | 1873 | | |
1872 | 1874 | | |
1873 | 1875 | | |
| 1876 | + | |
1874 | 1877 | | |
1875 | 1878 | | |
1876 | 1879 | | |
| |||
0 commit comments