diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 7acd99e3eba..bd284a8563c 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -3982,7 +3982,7 @@ impl ChannelMana pending_events.push(path_failure); if let Some(ev) = full_failure_ev { pending_events.push(ev); } }, - HTLCSource::PreviousHopData(HTLCPreviousHopData { short_channel_id, htlc_id, incoming_packet_shared_secret, phantom_shared_secret, .. }) => { + HTLCSource::PreviousHopData(HTLCPreviousHopData { short_channel_id, htlc_id, incoming_packet_shared_secret, phantom_shared_secret, outpoint }) => { let err_packet = match onion_error { HTLCFailReason::Reason { failure_code, data } => { log_trace!(self.logger, "Failing HTLC with payment_hash {} backwards from us with code {}", log_bytes!(payment_hash.0), failure_code); @@ -4020,6 +4020,11 @@ impl ChannelMana time_forwardable: time }); } + + let mut pending_events = self.pending_events.lock().unwrap(); + pending_events.push(events::Event::PaymentForwardedFailed { + source_channel_id: outpoint.to_channel_id() , sink_node_id: self.get_our_node_id() + }); }, } } diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 9fc3c80199b..0b48c5b7f9e 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -448,7 +448,7 @@ pub enum Event { /// Indicates that a payment has failed to be forwarded through us PaymentForwardedFailed { /// The channel_id of the sender - source_channel_id: u64, + source_channel_id: [u8; 32], /// The node_id of the receiver where forwarding has failed sink_node_id: PublicKey },