Add new HTLCDestination variant for invalid onion
[rust-lightning] / lightning / src / events / mod.rs
index f849dcc2fc24a29dd9dc9e5acfa1a06ca03c39a1..b43f2f9370d4370a70510af93c4828e2d3b93b92 100644 (file)
@@ -302,6 +302,8 @@ pub enum HTLCDestination {
                /// Short channel id we are requesting to forward an HTLC to.
                requested_forward_scid: u64
        },
+       /// We couldn't decode the incoming onion to obtain the forwarding details.
+       InvalidOnion,
        /// Failure scenario where an HTLC may have been forwarded to be intended for us,
        /// but is invalid for some reason, so we reject it.
        ///
@@ -329,6 +331,7 @@ impl_writeable_tlv_based_enum_upgradable!(HTLCDestination,
        (2, UnknownNextHop) => {
                (0, requested_forward_scid, required),
        },
+       (3, InvalidOnion) => {},
        (4, FailedPayment) => {
                (0, payment_hash, required),
        },