@@ -1484,10 +1484,10 @@ impl OutboundPayments {
1484
1484
) -> bool where L :: Target : Logger {
1485
1485
#[ cfg( test) ]
1486
1486
let DecodedOnionFailure {
1487
- network_update, short_channel_id, payment_retryable , onion_error_code, onion_error_data
1487
+ network_update, short_channel_id, recipient_rejected , onion_error_code, onion_error_data
1488
1488
} = onion_error. decode_onion_failure ( secp_ctx, logger, & source) ;
1489
1489
#[ cfg( not( test) ) ]
1490
- let DecodedOnionFailure { network_update, short_channel_id, payment_retryable } =
1490
+ let DecodedOnionFailure { network_update, short_channel_id, recipient_rejected } =
1491
1491
onion_error. decode_onion_failure ( secp_ctx, logger, & source) ;
1492
1492
1493
1493
let payment_is_probe = payment_is_probe ( payment_hash, & payment_id, probing_cookie_secret) ;
@@ -1528,8 +1528,8 @@ impl OutboundPayments {
1528
1528
payment. get_mut ( ) . insert_previously_failed_scid ( scid) ;
1529
1529
}
1530
1530
1531
- if payment_is_probe || !is_retryable_now || !payment_retryable {
1532
- let reason = if !payment_retryable {
1531
+ if payment_is_probe || !is_retryable_now || recipient_rejected {
1532
+ let reason = if recipient_rejected {
1533
1533
PaymentFailureReason :: RecipientRejected
1534
1534
} else {
1535
1535
PaymentFailureReason :: RetriesExhausted
@@ -1559,7 +1559,7 @@ impl OutboundPayments {
1559
1559
1560
1560
let path_failure = {
1561
1561
if payment_is_probe {
1562
- if !payment_retryable {
1562
+ if recipient_rejected {
1563
1563
events:: Event :: ProbeSuccessful {
1564
1564
payment_id : * payment_id,
1565
1565
payment_hash : payment_hash. clone ( ) ,
@@ -1583,7 +1583,7 @@ impl OutboundPayments {
1583
1583
events:: Event :: PaymentPathFailed {
1584
1584
payment_id : Some ( * payment_id) ,
1585
1585
payment_hash : payment_hash. clone ( ) ,
1586
- payment_failed_permanently : !payment_retryable ,
1586
+ payment_failed_permanently : recipient_rejected ,
1587
1587
failure : events:: PathFailure :: OnPath { network_update } ,
1588
1588
path : path. clone ( ) ,
1589
1589
short_channel_id,
0 commit comments