events: add TrampolineForward variant to HTLCHandlingFailureType
What changed, and why it matters
This commit adds a new event variant so the software can report when it fails to forward a special kind of Lightning payment called a 'trampoline' payment. It is purely an observability/logging change and does not alter how payments are handled, accepted, or rejected. There is no indication it fixes a security bug.
No security action required. Review as a normal feature/observability change.
Security signals we found
No security-relevant keywords in commit title or message
Pure enum/serialization addition with no behavioral logic
No bug fix, bounds check, or input validation change
No vendor or researcher attribution to a security issue
Evidence from the diff
The patch extends the HTLCHandlingFailureType enum with TrampolineForward {} and registers it in the TLV serialization macro. This allows Event::HTLCHandlingFailed to classify trampoline forwarding failures distinctly from other failure types. The change is additive, contains no logic modifications, and no security relevance is stated in the commit or supplied references.
Changed components
lightning/src/events/mod.rsHTLCHandlingFailureType enumEvent::HTLCHandlingFailed reportingInspect captured patch +5 / −0
diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs
index adf4ca0..011b7f5 100644
--- a/lightning/src/events/mod.rs
+++ b/lightning/src/events/mod.rs
@@ -584,6 +584,10 @@ pub enum HTLCHandlingFailureType {
/// The payment hash of the payment we attempted to process.
payment_hash: PaymentHash,
},
+ /// We were responsible for pathfinding and forwarding of a trampoline payment, but failed to
+ /// do so. An example of such an instance is when we can't find a route to the specified
+ /// trampoline destination.
+ TrampolineForward {},
}
impl_writeable_tlv_based_enum_upgradable!(HTLCHandlingFailureType,
@@ -601,6 +605,7 @@ impl_writeable_tlv_based_enum_upgradable!(HTLCHandlingFailureType,
(4, Receive) => {
(0, payment_hash, required),
},
+ (5, TrampolineForward) => {},
);
/// The reason for HTLC failures in [`Event::HTLCHandlingFailed`].
Why this scored 17/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.