@@ -445,6 +445,13 @@ pub enum Event {
445
445
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
446
446
channel_type : ChannelTypeFeatures ,
447
447
} ,
448
+ /// Indicates that a payment has failed to be forwarded through us
449
+ PaymentForwardedFailed {
450
+ /// The channel_id of the sender
451
+ source_channel_id : u64 ,
452
+ /// The node_id of the receiver where forwarding has failed
453
+ sink_node_id : PublicKey
454
+ } ,
448
455
}
449
456
450
457
impl Writeable for Event {
@@ -562,6 +569,13 @@ impl Writeable for Event {
562
569
// We never write the OpenChannelRequest events as, upon disconnection, peers
563
570
// drop any channels which have not yet exchanged funding_signed.
564
571
} ,
572
+ & Event :: PaymentForwardedFailed { ref source_channel_id, ref sink_node_id } => {
573
+ 18u8 . write ( writer) ?;
574
+ write_tlv_fields ! ( writer, {
575
+ ( 0 , source_channel_id, required) ,
576
+ ( 2 , sink_node_id, required) ,
577
+ } )
578
+ }
565
579
// Note that, going forward, all new events must only write data inside of
566
580
// `write_tlv_fields`. Versions 0.0.101+ will ignore odd-numbered events that write
567
581
// data via `write_tlv_fields`.
0 commit comments