Skip to content

Commit b558603

Browse files
committed
Add PaymentForwardedFailed event
1 parent 6592081 commit b558603

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
@@ -448,6 +448,13 @@ pub enum Event {
448448
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
449449
channel_type: ChannelTypeFeatures,
450450
},
451+
/// Indicates that a payment has failed to be forwarded through us
452+
PaymentForwardedFailed {
453+
/// The channel_id of the sender
454+
source_channel_id: u64,
455+
/// The node_id of the receiver where forwarding has failed
456+
sink_node_id: PublicKey
457+
},
451458
}
452459

453460
impl Writeable for Event {
@@ -566,6 +573,13 @@ impl Writeable for Event {
566573
// We never write the OpenChannelRequest events as, upon disconnection, peers
567574
// drop any channels which have not yet exchanged funding_signed.
568575
},
576+
&Event::PaymentForwardedFailed { ref source_channel_id, ref sink_node_id } => {
577+
18u8.write(writer)?;
578+
write_tlv_fields!(writer, {
579+
(0, source_channel_id, required),
580+
(2, sink_node_id, required),
581+
})
582+
}
569583
// Note that, going forward, all new events must only write data inside of
570584
// `write_tlv_fields`. Versions 0.0.101+ will ignore odd-numbered events that write
571585
// data via `write_tlv_fields`.

0 commit comments

Comments
 (0)