lsps-plugin: print whole error chain for HtlcError
What changed, and why it matters
This commit changes three error-message format strings in the LSPS (Lightning Service Provider Specification) plugin so that when an HTLC-related error occurs, the entire chain of underlying causes is printed instead of just the top-level message. It is a logging/diagnostics improvement with no apparent security impact.
No security action required. Treat as a normal diagnostic-quality improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In plugins/lsps-plugin/src/core/lsps2/htlc.rs, the Display format for three thiserror-derived variants (CapacityQuery, FundChannel, ChannelReadyCheck) is changed from {0} to {0:#}. For anyhow::Error, the alternate (#) formatter omits the outer ‘failed to …’ context and prints the full causal chain. This makes logs more informative when these errors are reported, but does not alter control flow, error handling, or any cryptographic/HTLC logic.
Changed components
plugins/lsps-plugin/src/core/lsps2/htlc.rsInspect captured patch +3 / −3
diff --git a/plugins/lsps-plugin/src/core/lsps2/htlc.rs b/plugins/lsps-plugin/src/core/lsps2/htlc.rs
index 5fa341ac..8585bd07 100644
--- a/plugins/lsps-plugin/src/core/lsps2/htlc.rs
+++ b/plugins/lsps-plugin/src/core/lsps2/htlc.rs
@@ -55,11 +55,11 @@ impl RejectReason {
#[derive(Debug, Error)]
pub enum HtlcError {
- #[error("failed to query channel capacity: {0}")]
+ #[error("failed to query channel capacity: {0:#}")]
CapacityQuery(#[source] anyhow::Error),
- #[error("failed to fund channel: {0}")]
+ #[error("failed to fund channel: {0:#}")]
FundChannel(#[source] anyhow::Error),
- #[error("channel ready check failed: {0}")]
+ #[error("channel ready check failed: {0:#}")]
ChannelReadyCheck(#[source] anyhow::Error),
}
Why this scored 15/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.