Skip to content

Commit 67f5ce8

Browse files
committed
Add new HTLCDestination variant for invalid onion
The existing variants do not cover such case as we previously never surfaced `HTLCHandlingFailed` events for HTLCs that we failed back with `UpdateFailMalformedHTLC` due to an invalid onion packet.
1 parent 195802d commit 67f5ce8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/events/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ pub enum HTLCDestination {
282282
/// Short channel id we are requesting to forward an HTLC to.
283283
requested_forward_scid: u64
284284
},
285+
/// We couldn't decode the incoming onion to obtain the forwarding details.
286+
InvalidOnion,
285287
/// Failure scenario where an HTLC may have been forwarded to be intended for us,
286288
/// but is invalid for some reason, so we reject it.
287289
///
@@ -309,6 +311,7 @@ impl_writeable_tlv_based_enum_upgradable!(HTLCDestination,
309311
(2, UnknownNextHop) => {
310312
(0, requested_forward_scid, required),
311313
},
314+
(3, InvalidOnion) => {},
312315
(4, FailedPayment) => {
313316
(0, payment_hash, required),
314317
},

0 commit comments

Comments
 (0)