@@ -5758,7 +5758,7 @@ where
57585758 },
57595759 }
57605760 } else {
5761- HTLCHandlingType::FailedPayment { payment_hash }
5761+ HTLCHandlingType::ReceiveFailed { payment_hash }
57625762 }
57635763 };
57645764
@@ -5932,7 +5932,7 @@ where
59325932 let reason = if $next_hop_unknown {
59335933 HTLCHandlingType::UnknownNextHop { requested_forward_scid: short_chan_id }
59345934 } else {
5935- HTLCHandlingType::FailedPayment { payment_hash }
5935+ HTLCHandlingType::ReceiveFailed { payment_hash }
59365936 };
59375937
59385938 failed_forwards.push((htlc_source, payment_hash,
@@ -6268,7 +6268,7 @@ where
62686268 cltv_expiry: Some(cltv_expiry),
62696269 }), payment_hash,
62706270 HTLCFailReason::reason(LocalHTLCFailureReason::IncorrectPaymentDetails, err_data),
6271- HTLCHandlingType::FailedPayment { payment_hash: $payment_hash },
6271+ HTLCHandlingType::ReceiveFailed { payment_hash: $payment_hash },
62726272 ));
62736273 continue 'next_forwardable_htlc;
62746274 }
@@ -6826,7 +6826,7 @@ where
68266826 let source = HTLCSource::PreviousHopData(htlc_source.0.clone());
68276827 let failure_reason = LocalHTLCFailureReason::MPPTimeout;
68286828 let reason = HTLCFailReason::from_failure_code(failure_reason);
6829- let receiver = HTLCHandlingType::FailedPayment { payment_hash: htlc_source.1 };
6829+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash: htlc_source.1 };
68306830 self.fail_htlc_backwards_internal(&source, &htlc_source.1, &reason, receiver);
68316831 }
68326832
@@ -6891,7 +6891,7 @@ where
68916891 for htlc in payment.htlcs {
68926892 let reason = self.get_htlc_fail_reason_from_failure_code(failure_code, &htlc);
68936893 let source = HTLCSource::PreviousHopData(htlc.prev_hop);
6894- let receiver = HTLCHandlingType::FailedPayment { payment_hash: *payment_hash };
6894+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash: *payment_hash };
68956895 self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
68966896 }
68976897 }
@@ -7119,7 +7119,7 @@ where
71197119 for htlc in htlcs {
71207120 let reason = self.get_htlc_fail_reason_from_failure_code(FailureCode::InvalidOnionPayload(None), &htlc);
71217121 let source = HTLCSource::PreviousHopData(htlc.prev_hop);
7122- let receiver = HTLCHandlingType::FailedPayment { payment_hash };
7122+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash };
71237123 self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
71247124 }
71257125 return;
@@ -7224,7 +7224,7 @@ where
72247224 let err_data = invalid_payment_err_data(htlc.value, self.best_block.read().unwrap().height);
72257225 let source = HTLCSource::PreviousHopData(htlc.prev_hop);
72267226 let reason = HTLCFailReason::reason(LocalHTLCFailureReason::IncorrectPaymentDetails, err_data);
7227- let receiver = HTLCHandlingType::FailedPayment { payment_hash };
7227+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash };
72287228 self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
72297229 }
72307230 self.claimable_payments.lock().unwrap().pending_claiming_payments.remove(&payment_hash);
@@ -11815,7 +11815,7 @@ where
1181511815 let reason = LocalHTLCFailureReason::PaymentClaimBuffer;
1181611816 timed_out_htlcs.push((HTLCSource::PreviousHopData(htlc.prev_hop.clone()), payment_hash.clone(),
1181711817 HTLCFailReason::reason(reason, invalid_payment_err_data(htlc.value, height)),
11818- HTLCHandlingType::FailedPayment { payment_hash: payment_hash.clone() }));
11818+ HTLCHandlingType::ReceiveFailed { payment_hash: payment_hash.clone() }));
1181911819 false
1182011820 } else { true }
1182111821 });
@@ -15099,7 +15099,7 @@ mod tests {
1509915099 check_added_monitors!(nodes[1], 0);
1510015100 commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1510115101 expect_pending_htlcs_forwardable!(nodes[1]);
15102- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash: our_payment_hash }]);
15102+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash: our_payment_hash }]);
1510315103 check_added_monitors!(nodes[1], 1);
1510415104 let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1510515105 assert!(updates.update_add_htlcs.is_empty());
@@ -15280,7 +15280,7 @@ mod tests {
1528015280 // We have to forward pending HTLCs twice - once tries to forward the payment forward (and
1528115281 // fails), the second will process the resulting failure and fail the HTLC backward
1528215282 expect_pending_htlcs_forwardable!(nodes[1]);
15283- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash }]);
15283+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash }]);
1528415284 check_added_monitors!(nodes[1], 1);
1528515285 let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1528615286 assert!(updates.update_add_htlcs.is_empty());
@@ -15325,7 +15325,7 @@ mod tests {
1532515325 check_added_monitors!(nodes[1], 0);
1532615326 commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1532715327 expect_pending_htlcs_forwardable!(nodes[1]);
15328- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash }]);
15328+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash }]);
1532915329 check_added_monitors!(nodes[1], 1);
1533015330 let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1533115331 assert!(updates.update_add_htlcs.is_empty());
@@ -15372,7 +15372,7 @@ mod tests {
1537215372 check_added_monitors!(nodes[1], 0);
1537315373 commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1537415374 expect_pending_htlcs_forwardable!(nodes[1]);
15375- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash }]);
15375+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash }]);
1537615376 check_added_monitors!(nodes[1], 1);
1537715377 let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1537815378 assert!(updates.update_add_htlcs.is_empty());
@@ -15429,7 +15429,7 @@ mod tests {
1542915429 nodes[1].node.handle_update_add_htlc(nodes[0].node.get_our_node_id(), &updates.update_add_htlcs[0]);
1543015430 commitment_signed_dance!(nodes[1], nodes[0], &updates.commitment_signed, false);
1543115431 expect_pending_htlcs_forwardable!(nodes[1]);
15432- expect_htlc_handling_failed_destinations!(nodes[1].node.get_and_clear_pending_events(), &[HTLCHandlingType::FailedPayment { payment_hash: mismatch_payment_hash }]);
15432+ expect_htlc_handling_failed_destinations!(nodes[1].node.get_and_clear_pending_events(), &[HTLCHandlingType::ReceiveFailed { payment_hash: mismatch_payment_hash }]);
1543315433 check_added_monitors(&nodes[1], 1);
1543415434 let _ = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1543515435
0 commit comments