@@ -16273,13 +16273,11 @@ where
16273
16273
}
16274
16274
16275
16275
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()
16277
16278
{
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));
16283
16281
if let HTLCSource::OutboundRoute {
16284
16282
payment_id, session_priv, path, ..
16285
16283
} = htlc_source
@@ -16293,22 +16291,19 @@ where
16293
16291
session_priv_bytes[..].copy_from_slice(&session_priv[..]);
16294
16292
pending_outbounds.insert_from_monitor_on_startup(
16295
16293
payment_id,
16296
- htlc. payment_hash,
16294
+ payment_hash,
16297
16295
session_priv_bytes,
16298
16296
&path,
16299
16297
best_block_height,
16300
16298
logger,
16301
16299
);
16302
16300
}
16303
16301
}
16304
- for (htlc_source, (htlc , preimage_opt)) in
16302
+ for (htlc_source, (payment_hash, _ , preimage_opt)) in
16305
16303
monitor.get_all_current_outbound_htlcs()
16306
16304
{
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));
16312
16307
match htlc_source {
16313
16308
HTLCSource::PreviousHopData(prev_hop_data) => {
16314
16309
let pending_forward_matches_htlc = |info: &PendingAddHTLCInfo| {
@@ -16326,7 +16321,7 @@ where
16326
16321
update_add_htlc.htlc_id == prev_hop_data.htlc_id;
16327
16322
if matches {
16328
16323
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());
16330
16325
}
16331
16326
!matches
16332
16327
});
@@ -16337,7 +16332,7 @@ where
16337
16332
if let HTLCForwardInfo::AddHTLC(htlc_info) = forward {
16338
16333
if pending_forward_matches_htlc(&htlc_info) {
16339
16334
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());
16341
16336
false
16342
16337
} else { true }
16343
16338
} else { true }
@@ -16347,7 +16342,7 @@ where
16347
16342
pending_intercepted_htlcs.as_mut().unwrap().retain(|intercepted_id, htlc_info| {
16348
16343
if pending_forward_matches_htlc(&htlc_info) {
16349
16344
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());
16351
16346
pending_events_read.retain(|(event, _)| {
16352
16347
if let Event::HTLCIntercepted { intercept_id: ev_id, .. } = event {
16353
16348
intercepted_id != ev_id
@@ -16404,7 +16399,7 @@ where
16404
16399
let mut fail_read = false;
16405
16400
let outbound_claimed_htlcs_iter = monitor.get_all_current_outbound_htlcs()
16406
16401
.into_iter()
16407
- .filter_map(|(htlc_source, (htlc , preimage_opt))| {
16402
+ .filter_map(|(htlc_source, (_, amount_msat , preimage_opt))| {
16408
16403
if let HTLCSource::PreviousHopData(prev_hop) = &htlc_source {
16409
16404
if let Some(payment_preimage) = preimage_opt {
16410
16405
let inbound_edge_monitor = args.channel_monitors.get(&prev_hop.channel_id);
@@ -16492,7 +16487,7 @@ where
16492
16487
);
16493
16488
}
16494
16489
16495
- Some((htlc_source, payment_preimage, htlc. amount_msat,
16490
+ Some((htlc_source, payment_preimage, amount_msat,
16496
16491
is_channel_closed, monitor.get_counterparty_node_id(),
16497
16492
monitor.get_funding_txo(), monitor.channel_id()))
16498
16493
} else { None }
0 commit comments