@@ -5754,7 +5754,7 @@ where
5754
5754
},
5755
5755
}
5756
5756
} else {
5757
- HTLCHandlingType::FailedPayment { payment_hash }
5757
+ HTLCHandlingType::ReceiveFailed { payment_hash }
5758
5758
}
5759
5759
};
5760
5760
@@ -5927,7 +5927,7 @@ where
5927
5927
let reason = if $next_hop_unknown {
5928
5928
HTLCHandlingType::UnknownNextHop { requested_forward_scid: short_chan_id }
5929
5929
} else {
5930
- HTLCHandlingType::FailedPayment { payment_hash }
5930
+ HTLCHandlingType::ReceiveFailed { payment_hash }
5931
5931
};
5932
5932
5933
5933
failed_forwards.push((htlc_source, payment_hash,
@@ -6266,7 +6266,7 @@ where
6266
6266
cltv_expiry: Some(cltv_expiry),
6267
6267
}), payment_hash,
6268
6268
HTLCFailReason::reason(LocalHTLCFailureReason::IncorrectPaymentDetails, htlc_msat_height_data),
6269
- HTLCHandlingType::FailedPayment { payment_hash: $payment_hash },
6269
+ HTLCHandlingType::ReceiveFailed { payment_hash: $payment_hash },
6270
6270
));
6271
6271
continue 'next_forwardable_htlc;
6272
6272
}
@@ -6824,7 +6824,7 @@ where
6824
6824
let source = HTLCSource::PreviousHopData(htlc_source.0.clone());
6825
6825
let failure_reason = LocalHTLCFailureReason::MPPTimeout;
6826
6826
let reason = HTLCFailReason::from_failure_code(failure_reason);
6827
- let receiver = HTLCHandlingType::FailedPayment { payment_hash: htlc_source.1 };
6827
+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash: htlc_source.1 };
6828
6828
self.fail_htlc_backwards_internal(&source, &htlc_source.1, &reason, receiver);
6829
6829
}
6830
6830
@@ -6889,7 +6889,7 @@ where
6889
6889
for htlc in payment.htlcs {
6890
6890
let reason = self.get_htlc_fail_reason_from_failure_code(failure_code, &htlc);
6891
6891
let source = HTLCSource::PreviousHopData(htlc.prev_hop);
6892
- let receiver = HTLCHandlingType::FailedPayment { payment_hash: *payment_hash };
6892
+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash: *payment_hash };
6893
6893
self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
6894
6894
}
6895
6895
}
@@ -7117,7 +7117,7 @@ where
7117
7117
for htlc in htlcs {
7118
7118
let reason = self.get_htlc_fail_reason_from_failure_code(FailureCode::InvalidOnionPayload(None), &htlc);
7119
7119
let source = HTLCSource::PreviousHopData(htlc.prev_hop);
7120
- let receiver = HTLCHandlingType::FailedPayment { payment_hash };
7120
+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash };
7121
7121
self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
7122
7122
}
7123
7123
return;
@@ -7223,7 +7223,7 @@ where
7223
7223
htlc_msat_height_data.extend_from_slice(&self.best_block.read().unwrap().height.to_be_bytes());
7224
7224
let source = HTLCSource::PreviousHopData(htlc.prev_hop);
7225
7225
let reason = HTLCFailReason::reason(LocalHTLCFailureReason::IncorrectPaymentDetails, htlc_msat_height_data);
7226
- let receiver = HTLCHandlingType::FailedPayment { payment_hash };
7226
+ let receiver = HTLCHandlingType::ReceiveFailed { payment_hash };
7227
7227
self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
7228
7228
}
7229
7229
self.claimable_payments.lock().unwrap().pending_claiming_payments.remove(&payment_hash);
@@ -11816,7 +11816,7 @@ where
11816
11816
let reason = LocalHTLCFailureReason::PaymentClaimBuffer;
11817
11817
timed_out_htlcs.push((HTLCSource::PreviousHopData(htlc.prev_hop.clone()), payment_hash.clone(),
11818
11818
HTLCFailReason::reason(reason, htlc_msat_height_data),
11819
- HTLCHandlingType::FailedPayment { payment_hash: payment_hash.clone() }));
11819
+ HTLCHandlingType::ReceiveFailed { payment_hash: payment_hash.clone() }));
11820
11820
false
11821
11821
} else { true }
11822
11822
});
@@ -15100,7 +15100,7 @@ mod tests {
15100
15100
check_added_monitors!(nodes[1], 0);
15101
15101
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
15102
15102
expect_pending_htlcs_forwardable!(nodes[1]);
15103
- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash: our_payment_hash }]);
15103
+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash: our_payment_hash }]);
15104
15104
check_added_monitors!(nodes[1], 1);
15105
15105
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
15106
15106
assert!(updates.update_add_htlcs.is_empty());
@@ -15281,7 +15281,7 @@ mod tests {
15281
15281
// We have to forward pending HTLCs twice - once tries to forward the payment forward (and
15282
15282
// fails), the second will process the resulting failure and fail the HTLC backward
15283
15283
expect_pending_htlcs_forwardable!(nodes[1]);
15284
- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash }]);
15284
+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash }]);
15285
15285
check_added_monitors!(nodes[1], 1);
15286
15286
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
15287
15287
assert!(updates.update_add_htlcs.is_empty());
@@ -15326,7 +15326,7 @@ mod tests {
15326
15326
check_added_monitors!(nodes[1], 0);
15327
15327
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
15328
15328
expect_pending_htlcs_forwardable!(nodes[1]);
15329
- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash }]);
15329
+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash }]);
15330
15330
check_added_monitors!(nodes[1], 1);
15331
15331
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
15332
15332
assert!(updates.update_add_htlcs.is_empty());
@@ -15373,7 +15373,7 @@ mod tests {
15373
15373
check_added_monitors!(nodes[1], 0);
15374
15374
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
15375
15375
expect_pending_htlcs_forwardable!(nodes[1]);
15376
- expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::FailedPayment { payment_hash }]);
15376
+ expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCHandlingType::ReceiveFailed { payment_hash }]);
15377
15377
check_added_monitors!(nodes[1], 1);
15378
15378
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
15379
15379
assert!(updates.update_add_htlcs.is_empty());
@@ -15430,7 +15430,7 @@ mod tests {
15430
15430
nodes[1].node.handle_update_add_htlc(nodes[0].node.get_our_node_id(), &updates.update_add_htlcs[0]);
15431
15431
commitment_signed_dance!(nodes[1], nodes[0], &updates.commitment_signed, false);
15432
15432
expect_pending_htlcs_forwardable!(nodes[1]);
15433
- expect_htlc_handling_failed_destinations!(nodes[1].node.get_and_clear_pending_events(), &[HTLCHandlingType::FailedPayment { payment_hash: mismatch_payment_hash }]);
15433
+ expect_htlc_handling_failed_destinations!(nodes[1].node.get_and_clear_pending_events(), &[HTLCHandlingType::ReceiveFailed { payment_hash: mismatch_payment_hash }]);
15434
15434
check_added_monitors(&nodes[1], 1);
15435
15435
let _ = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
15436
15436
0 commit comments