You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let log_keysend = |keysend| if keysend { "keysend" } else { "non-keysend" };
5493
-
log_trace!(self.logger, "Failing new {} HTLC with payment_hash {} as we already had an existing {} HTLC with the same payment hash", log_keysend(is_keysend), &payment_hash, log_keysend(!is_keysend));
5510
+
log_trace!(logger, "Failing new {} HTLC with payment_hash {} as we already had an existing {} HTLC with the same payment hash", log_keysend(is_keysend), &payment_hash, log_keysend(!is_keysend));
5494
5511
fail_htlc!(claimable_htlc, payment_hash);
5495
5512
}
5496
5513
if !self.default_configuration.accept_mpp_keysend && is_keysend && !claimable_payment.htlcs.is_empty() {
5497
-
log_trace!(self.logger, "Failing new keysend HTLC with payment_hash {} as we already had an existing keysend HTLC with the same payment hash and our config states we don't accept MPP keysend", &payment_hash);
5514
+
log_trace!(logger, "Failing new keysend HTLC with payment_hash {} as we already had an existing keysend HTLC with the same payment hash and our config states we don't accept MPP keysend", &payment_hash);
5498
5515
fail_htlc!(claimable_htlc, payment_hash);
5499
5516
}
5500
5517
if let Some(earlier_fields) = &mut claimable_payment.onion_fields {
} else if total_value - claimable_htlc.sender_intended_value >= claimable_htlc.total_msat {
5525
-
log_trace!(self.logger, "Failing HTLC with payment_hash {} as payment is already claimable",
5542
+
log_trace!(logger, "Failing HTLC with payment_hash {} as payment is already claimable",
5526
5543
&payment_hash);
5527
5544
fail_htlc!(claimable_htlc, payment_hash);
5528
5545
} else if total_value >= claimable_htlc.total_msat {
@@ -5573,17 +5590,17 @@ where
5573
5590
match claimable_htlc.onion_payload {
5574
5591
OnionPayload::Invoice { .. } => {
5575
5592
let payment_data = payment_data.unwrap();
5576
-
let (payment_preimage, min_final_cltv_expiry_delta) = match inbound_payment::verify(payment_hash, &payment_data, self.highest_seen_timestamp.load(Ordering::Acquire) as u64, &self.inbound_payment_key, &self.logger) {
5593
+
let (payment_preimage, min_final_cltv_expiry_delta) = match inbound_payment::verify(payment_hash, &payment_data, self.highest_seen_timestamp.load(Ordering::Acquire) as u64, &self.inbound_payment_key, logger.deref()) {
5577
5594
Ok(result) => result,
5578
5595
Err(()) => {
5579
-
log_trace!(self.logger, "Failing new HTLC with payment_hash {} as payment verification failed", &payment_hash);
5596
+
log_trace!(logger, "Failing new HTLC with payment_hash {} as payment verification failed", &payment_hash);
5580
5597
fail_htlc!(claimable_htlc, payment_hash);
5581
5598
}
5582
5599
};
5583
5600
if let Some(min_final_cltv_expiry_delta) = min_final_cltv_expiry_delta {
5584
5601
let expected_min_expiry_height = (self.current_best_block().height + min_final_cltv_expiry_delta as u32) as u64;
5585
5602
if (cltv_expiry as u64) < expected_min_expiry_height {
5586
-
log_trace!(self.logger, "Failing new HTLC with payment_hash {} as its CLTV expiry was too soon (had {}, earliest expected {})",
5603
+
log_trace!(logger, "Failing new HTLC with payment_hash {} as its CLTV expiry was too soon (had {}, earliest expected {})",
if let OnionPayload::Spontaneous(_) = claimable_htlc.onion_payload {
5606
-
log_trace!(self.logger, "Failing new keysend HTLC with payment_hash {} because we already have an inbound payment with the same payment hash", &payment_hash);
5623
+
log_trace!(logger, "Failing new keysend HTLC with payment_hash {} because we already have an inbound payment with the same payment hash", &payment_hash);
5607
5624
fail_htlc!(claimable_htlc, payment_hash);
5608
5625
}
5609
5626
let payment_data = payment_data.unwrap();
5610
5627
if inbound_payment.get().payment_secret != payment_data.payment_secret {
5611
-
log_trace!(self.logger, "Failing new HTLC with payment_hash {} as it didn't match our expected payment secret.", &payment_hash);
5628
+
log_trace!(logger, "Failing new HTLC with payment_hash {} as it didn't match our expected payment secret.", &payment_hash);
5612
5629
fail_htlc!(claimable_htlc, payment_hash);
5613
5630
} else if inbound_payment.get().min_value_msat.is_some() && payment_data.total_msat < inbound_payment.get().min_value_msat.unwrap() {
5614
-
log_trace!(self.logger, "Failing new HTLC with payment_hash {} as it didn't match our minimum value (had {}, needed {}).",
5631
+
log_trace!(logger, "Failing new HTLC with payment_hash {} as it didn't match our minimum value (had {}, needed {}).",
0 commit comments