Skip to content

Commit 9f47d5c

Browse files
committed
Add channel monitor recovery for trampoline forwards
Implement channel monitor recovery for trampoline forwards iterating over all hop data and updating pending forwards.
1 parent e0677b0 commit 9f47d5c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16565,7 +16565,20 @@ where
1656516565
monitor.channel_id(),
1656616566
);
1656716567
},
16568-
HTLCSource::TrampolineForward { .. } => todo!(),
16568+
HTLCSource::TrampolineForward { previous_hop_data, .. } => {
16569+
for current_previous_hop_data in previous_hop_data {
16570+
channel_monitor_recovery_internal(
16571+
&mut forward_htlcs,
16572+
&mut pending_events_read,
16573+
&mut pending_intercepted_htlcs,
16574+
&mut decode_update_add_htlcs,
16575+
current_previous_hop_data,
16576+
&logger,
16577+
htlc.payment_hash,
16578+
monitor.channel_id(),
16579+
);
16580+
}
16581+
},
1656916582
HTLCSource::OutboundRoute {
1657016583
payment_id,
1657116584
session_priv,

0 commit comments

Comments
 (0)