Skip to content

Commit b9a8b09

Browse files
a-mpchcarlaKC
authored andcommitted
ln: 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 56b1b79 commit b9a8b09

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18262,7 +18262,21 @@ where
1826218262
monitor.channel_id(),
1826318263
);
1826418264
},
18265-
HTLCSource::TrampolineForward { .. } => todo!(),
18265+
HTLCSource::TrampolineForward { previous_hop_data, .. } => {
18266+
for prev_hop_data in previous_hop_data {
18267+
reconcile_pending_htlcs_with_monitor(
18268+
&mut forward_htlcs_legacy,
18269+
&mut pending_events_read,
18270+
&mut pending_intercepted_htlcs_legacy,
18271+
&mut decode_update_add_htlcs,
18272+
&mut decode_update_add_htlcs_legacy,
18273+
prev_hop_data,
18274+
&logger,
18275+
htlc.payment_hash,
18276+
monitor.channel_id(),
18277+
);
18278+
}
18279+
},
1826618280
HTLCSource::OutboundRoute {
1826718281
payment_id,
1826818282
session_priv,

0 commit comments

Comments
 (0)