ln: add from_u16 implementation for new trampoline errors
What changed, and why it matters
This commit adds three new error-code names to an existing internal lookup table that converts numeric codes into human-readable failure reasons. It is a straightforward code-completion change with no visible security effect.
No security action required; review as part of normal code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch extends the impl_from_u16_for_htlc_reason! macro invocation in lightning/src/ln/onion_utils.rs to include TemporaryTrampolineFailure, TrampolineFeeOrExpiryInsufficient, and UnknownNextTrampoline. These are new trampoline routing failure reasons being added to the protocol mapping. The change is additive (+3 lines), symmetric with existing entries, and does not alter parsing logic, memory handling, authentication, or cryptographic operations.
Changed components
lightning/src/ln/onion_utils.rsInspect captured patch +3 / −0
diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs
index 75fa46f..18aa43e 100644
--- a/lightning/src/ln/onion_utils.rs
+++ b/lightning/src/ln/onion_utils.rs
@@ -1800,6 +1800,9 @@ impl_from_u16_for_htlc_reason!(
InvalidOnionPayload,
MPPTimeout,
InvalidOnionBlinding,
+ TemporaryTrampolineFailure,
+ TrampolineFeeOrExpiryInsufficient,
+ UnknownNextTrampoline,
]
);
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.