Add APIs to prune completed state for LSPS1/LSPS2/LSPS5#4526
Draft
f3r10 wants to merge 1 commit intolightningdevkit:mainfrom
Draft
Add APIs to prune completed state for LSPS1/LSPS2/LSPS5#4526f3r10 wants to merge 1 commit intolightningdevkit:mainfrom
f3r10 wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
`LSPS1ServiceHandler` accumulates `ChannelOrder` records indefinitely. `CompletedAndChannelOpened` orders were never pruned automatically, and `FailedAndRefunded` orders were only pruned once all payment invoices in them had expired — which can be days away. Add `LSPS1ServiceHandler::prune_order` (and a sync wrapper on `LSPS1ServiceHandlerSync`) that lets the LSP operator explicitly remove any order that has reached a terminal state. The call persists the change to the KVStore before returning. Non-terminal orders (`ExpectingPayment`, `OrderPaid`) are rejected with the new `PeerStateError::OrderNotPrunable` variant so that in-progress orders cannot be silently discarded.
|
👋 Hi! I see this is a draft PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.