Report LSPS5 fallback persistence
What changed, and why it matters
This is a tiny one-line fix in a Lightning Service Provider feature (LSPS5). Previously, when the code had to force-save peer state for a client that was about to be removed, it saved the data but forgot to report that it had done so. The fix makes the code correctly report 'yes, we persisted.' This is a bookkeeping/reporting bug, not a direct funds-loss vulnerability, but incorrect persistence reporting could mislead callers about whether state was saved.
Treat as a low-risk correctness fix. Review callers of the affected function to confirm they handle did_persist correctly and that no downstream logic relied on the previous false-negative reporting. No urgent security response is indicated by the diff alone.
Security signals we found
Incorrect boolean return value for persistence status
State-management bookkeeping fix in prunable client lifecycle
No cryptographic, signature, or channel-funding logic changed
Evidence from the diff
In lightning-liquidity/src/lsps5/service.rs, the prunable-client removal path calls persist_peer_state() in a fallback branch but did not set did_persist = true. The patch adds that assignment. This ensures the return value accurately reflects that a forced peer-state write reached the store. The change is local and defensive; it does not alter cryptographic or consensus-critical logic.
Changed components
lightning-liquidity/src/lsps5/service.rsLSPS5 service provider client-state persistence reportingInspect captured patch +1 / −0
diff --git a/lightning-liquidity/src/lsps5/service.rs b/lightning-liquidity/src/lsps5/service.rs
index 7360131..3d00754 100644
--- a/lightning-liquidity/src/lsps5/service.rs
+++ b/lightning-liquidity/src/lsps5/service.rs
@@ -335,6 +335,7 @@ where
did_persist = true;
} else {
self.persist_peer_state(client_id).await?;
+ did_persist = true;
}
}
Why this scored 23/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.