@@ -16273,13 +16273,11 @@ where
1627316273 }
1627416274
1627516275 if is_channel_closed {
16276- for (htlc_source, (htlc, _)) in monitor.get_pending_or_resolved_outbound_htlcs()
16276+ for (htlc_source, (payment_hash, _, _)) in
16277+ monitor.get_pending_or_resolved_outbound_htlcs()
1627716278 {
16278- let logger = WithChannelMonitor::from(
16279- &args.logger,
16280- monitor,
16281- Some(htlc.payment_hash),
16282- );
16279+ let logger =
16280+ WithChannelMonitor::from(&args.logger, monitor, Some(payment_hash));
1628316281 if let HTLCSource::OutboundRoute {
1628416282 payment_id, session_priv, path, ..
1628516283 } = htlc_source
@@ -16293,22 +16291,19 @@ where
1629316291 session_priv_bytes[..].copy_from_slice(&session_priv[..]);
1629416292 pending_outbounds.insert_from_monitor_on_startup(
1629516293 payment_id,
16296- htlc. payment_hash,
16294+ payment_hash,
1629716295 session_priv_bytes,
1629816296 &path,
1629916297 best_block_height,
1630016298 logger,
1630116299 );
1630216300 }
1630316301 }
16304- for (htlc_source, (htlc , preimage_opt)) in
16302+ for (htlc_source, (payment_hash, _ , preimage_opt)) in
1630516303 monitor.get_all_current_outbound_htlcs()
1630616304 {
16307- let logger = WithChannelMonitor::from(
16308- &args.logger,
16309- monitor,
16310- Some(htlc.payment_hash),
16311- );
16305+ let logger =
16306+ WithChannelMonitor::from(&args.logger, monitor, Some(payment_hash));
1631216307 match htlc_source {
1631316308 HTLCSource::PreviousHopData(prev_hop_data) => {
1631416309 let pending_forward_matches_htlc = |info: &PendingAddHTLCInfo| {
@@ -16326,7 +16321,7 @@ where
1632616321 update_add_htlc.htlc_id == prev_hop_data.htlc_id;
1632716322 if matches {
1632816323 log_info!(logger, "Removing pending to-decode HTLC with hash {} as it was forwarded to the closed channel {}",
16329- &htlc. payment_hash, &monitor.channel_id());
16324+ &payment_hash, &monitor.channel_id());
1633016325 }
1633116326 !matches
1633216327 });
@@ -16337,7 +16332,7 @@ where
1633716332 if let HTLCForwardInfo::AddHTLC(htlc_info) = forward {
1633816333 if pending_forward_matches_htlc(&htlc_info) {
1633916334 log_info!(logger, "Removing pending to-forward HTLC with hash {} as it was forwarded to the closed channel {}",
16340- &htlc. payment_hash, &monitor.channel_id());
16335+ &payment_hash, &monitor.channel_id());
1634116336 false
1634216337 } else { true }
1634316338 } else { true }
@@ -16347,7 +16342,7 @@ where
1634716342 pending_intercepted_htlcs.as_mut().unwrap().retain(|intercepted_id, htlc_info| {
1634816343 if pending_forward_matches_htlc(&htlc_info) {
1634916344 log_info!(logger, "Removing pending intercepted HTLC with hash {} as it was forwarded to the closed channel {}",
16350- &htlc. payment_hash, &monitor.channel_id());
16345+ &payment_hash, &monitor.channel_id());
1635116346 pending_events_read.retain(|(event, _)| {
1635216347 if let Event::HTLCIntercepted { intercept_id: ev_id, .. } = event {
1635316348 intercepted_id != ev_id
@@ -16404,7 +16399,7 @@ where
1640416399 let mut fail_read = false;
1640516400 let outbound_claimed_htlcs_iter = monitor.get_all_current_outbound_htlcs()
1640616401 .into_iter()
16407- .filter_map(|(htlc_source, (htlc , preimage_opt))| {
16402+ .filter_map(|(htlc_source, (_, amount_msat , preimage_opt))| {
1640816403 if let HTLCSource::PreviousHopData(prev_hop) = &htlc_source {
1640916404 if let Some(payment_preimage) = preimage_opt {
1641016405 let inbound_edge_monitor = args.channel_monitors.get(&prev_hop.channel_id);
@@ -16492,7 +16487,7 @@ where
1649216487 );
1649316488 }
1649416489
16495- Some((htlc_source, payment_preimage, htlc. amount_msat,
16490+ Some((htlc_source, payment_preimage, amount_msat,
1649616491 is_channel_closed, monitor.get_counterparty_node_id(),
1649716492 monitor.get_funding_txo(), monitor.channel_id()))
1649816493 } else { None }
0 commit comments