Skip to content

Commit 97dcedb

Browse files
committed
Add PaymentForwardedFailed event
1 parent af31831 commit 97dcedb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lightning/src/util/events.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,13 @@ pub enum Event {
445445
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
446446
channel_type: ChannelTypeFeatures,
447447
},
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+
},
448455
}
449456

450457
impl Writeable for Event {
@@ -562,6 +569,13 @@ impl Writeable for Event {
562569
// We never write the OpenChannelRequest events as, upon disconnection, peers
563570
// drop any channels which have not yet exchanged funding_signed.
564571
},
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+
}
565579
// Note that, going forward, all new events must only write data inside of
566580
// `write_tlv_fields`. Versions 0.0.101+ will ignore odd-numbered events that write
567581
// data via `write_tlv_fields`.

0 commit comments

Comments
 (0)