@@ -3020,7 +3020,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
3020
3020
_ => panic ! ( "Unexepected event" ) ,
3021
3021
}
3022
3022
match events[ 1 ] {
3023
- Event :: PaymentFailed { ref payment_hash, .. } => {
3023
+ Event :: PaymentPathFailed { ref payment_hash, .. } => {
3024
3024
assert_eq ! ( * payment_hash, fourth_payment_hash) ;
3025
3025
} ,
3026
3026
_ => panic ! ( "Unexpected event" ) ,
@@ -3076,7 +3076,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
3076
3076
let events = nodes[ 0 ] . node . get_and_clear_pending_events ( ) ;
3077
3077
assert_eq ! ( events. len( ) , 3 ) ;
3078
3078
match events[ 0 ] {
3079
- Event :: PaymentFailed { ref payment_hash, rejected_by_dest : _, ref network_update, .. } => {
3079
+ Event :: PaymentPathFailed { ref payment_hash, rejected_by_dest : _, ref network_update, .. } => {
3080
3080
assert ! ( failed_htlcs. insert( payment_hash. 0 ) ) ;
3081
3081
// If we delivered B's RAA we got an unknown preimage error, not something
3082
3082
// that we should update our routing table for.
@@ -3087,14 +3087,14 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
3087
3087
_ => panic ! ( "Unexpected event" ) ,
3088
3088
}
3089
3089
match events[ 1 ] {
3090
- Event :: PaymentFailed { ref payment_hash, rejected_by_dest : _, ref network_update, .. } => {
3090
+ Event :: PaymentPathFailed { ref payment_hash, rejected_by_dest : _, ref network_update, .. } => {
3091
3091
assert ! ( failed_htlcs. insert( payment_hash. 0 ) ) ;
3092
3092
assert ! ( network_update. is_some( ) ) ;
3093
3093
} ,
3094
3094
_ => panic ! ( "Unexpected event" ) ,
3095
3095
}
3096
3096
match events[ 2 ] {
3097
- Event :: PaymentFailed { ref payment_hash, rejected_by_dest : _, ref network_update, .. } => {
3097
+ Event :: PaymentPathFailed { ref payment_hash, rejected_by_dest : _, ref network_update, .. } => {
3098
3098
assert ! ( failed_htlcs. insert( payment_hash. 0 ) ) ;
3099
3099
assert ! ( network_update. is_some( ) ) ;
3100
3100
} ,
@@ -3392,7 +3392,7 @@ fn test_simple_peer_disconnect() {
3392
3392
_ => panic ! ( "Unexpected event" ) ,
3393
3393
}
3394
3394
match events[ 1 ] {
3395
- Event :: PaymentFailed { payment_hash, rejected_by_dest, .. } => {
3395
+ Event :: PaymentPathFailed { payment_hash, rejected_by_dest, .. } => {
3396
3396
assert_eq ! ( payment_hash, payment_hash_5) ;
3397
3397
assert ! ( rejected_by_dest) ;
3398
3398
} ,
@@ -4192,7 +4192,7 @@ fn test_dup_htlc_onchain_fails_on_reload() {
4192
4192
//
4193
4193
// If, due to an on-chain event, an HTLC is failed/claimed, and then we serialize the
4194
4194
// ChannelManager, we generally expect there not to be a duplicate HTLC fail/claim (eg via a
4195
- // PaymentFailed event appearing). However, because we may not serialize the relevant
4195
+ // PaymentPathFailed event appearing). However, because we may not serialize the relevant
4196
4196
// ChannelMonitor at the same time, this isn't strictly guaranteed. In order to provide this
4197
4197
// consistency, the ChannelManager explicitly tracks pending-onchain-resolution outbound HTLCs
4198
4198
// and de-duplicates ChannelMonitor events.
@@ -5518,7 +5518,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
5518
5518
let mut as_failds = HashSet :: new ( ) ;
5519
5519
let mut as_updates = 0 ;
5520
5520
for event in as_events. iter ( ) {
5521
- if let & Event :: PaymentFailed { ref payment_hash, ref rejected_by_dest, ref network_update, .. } = event {
5521
+ if let & Event :: PaymentPathFailed { ref payment_hash, ref rejected_by_dest, ref network_update, .. } = event {
5522
5522
assert ! ( as_failds. insert( * payment_hash) ) ;
5523
5523
if * payment_hash != payment_hash_2 {
5524
5524
assert_eq ! ( * rejected_by_dest, deliver_last_raa) ;
@@ -5543,7 +5543,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
5543
5543
let mut bs_failds = HashSet :: new ( ) ;
5544
5544
let mut bs_updates = 0 ;
5545
5545
for event in bs_events. iter ( ) {
5546
- if let & Event :: PaymentFailed { ref payment_hash, ref rejected_by_dest, ref network_update, .. } = event {
5546
+ if let & Event :: PaymentPathFailed { ref payment_hash, ref rejected_by_dest, ref network_update, .. } = event {
5547
5547
assert ! ( bs_failds. insert( * payment_hash) ) ;
5548
5548
if * payment_hash != payment_hash_1 && * payment_hash != payment_hash_5 {
5549
5549
assert_eq ! ( * rejected_by_dest, deliver_last_raa) ;
@@ -6068,7 +6068,7 @@ fn test_fail_holding_cell_htlc_upon_free() {
6068
6068
let events = nodes[ 0 ] . node . get_and_clear_pending_events ( ) ;
6069
6069
assert_eq ! ( events. len( ) , 1 ) ;
6070
6070
match & events[ 0 ] {
6071
- & Event :: PaymentFailed { ref payment_hash, ref rejected_by_dest, ref network_update, ref error_code, ref error_data, ref all_paths_failed } => {
6071
+ & Event :: PaymentPathFailed { ref payment_hash, ref rejected_by_dest, ref network_update, ref error_code, ref error_data, ref all_paths_failed } => {
6072
6072
assert_eq ! ( our_payment_hash. clone( ) , * payment_hash) ;
6073
6073
assert_eq ! ( * rejected_by_dest, false ) ;
6074
6074
assert_eq ! ( * all_paths_failed, true ) ;
@@ -6155,7 +6155,7 @@ fn test_free_and_fail_holding_cell_htlcs() {
6155
6155
let events = nodes[ 0 ] . node . get_and_clear_pending_events ( ) ;
6156
6156
assert_eq ! ( events. len( ) , 1 ) ;
6157
6157
match & events[ 0 ] {
6158
- & Event :: PaymentFailed { ref payment_hash, ref rejected_by_dest, ref network_update, ref error_code, ref error_data, ref all_paths_failed } => {
6158
+ & Event :: PaymentPathFailed { ref payment_hash, ref rejected_by_dest, ref network_update, ref error_code, ref error_data, ref all_paths_failed } => {
6159
6159
assert_eq ! ( payment_hash_2. clone( ) , * payment_hash) ;
6160
6160
assert_eq ! ( * rejected_by_dest, false ) ;
6161
6161
assert_eq ! ( * all_paths_failed, true ) ;
@@ -7107,12 +7107,12 @@ fn do_test_failure_delay_dust_htlc_local_commitment(announce_latest: bool) {
7107
7107
assert_eq ! ( nodes[ 0 ] . node. get_and_clear_pending_events( ) . len( ) , 0 ) ;
7108
7108
connect_blocks ( & nodes[ 0 ] , ANTI_REORG_DELAY - 1 ) ;
7109
7109
let events = nodes[ 0 ] . node . get_and_clear_pending_events ( ) ;
7110
- // Only 2 PaymentFailed events should show up, over-dust HTLC has to be failed by timeout tx
7110
+ // Only 2 PaymentPathFailed events should show up, over-dust HTLC has to be failed by timeout tx
7111
7111
assert_eq ! ( events. len( ) , 2 ) ;
7112
7112
let mut first_failed = false ;
7113
7113
for event in events {
7114
7114
match event {
7115
- Event :: PaymentFailed { payment_hash, .. } => {
7115
+ Event :: PaymentPathFailed { payment_hash, .. } => {
7116
7116
if payment_hash == payment_hash_1 {
7117
7117
assert ! ( !first_failed) ;
7118
7118
first_failed = true ;
@@ -7202,14 +7202,14 @@ fn do_test_sweep_outbound_htlc_failure_update(revoked: bool, local: bool) {
7202
7202
assert_eq ! ( events. len( ) , 2 ) ;
7203
7203
let first;
7204
7204
match events[ 0 ] {
7205
- Event :: PaymentFailed { payment_hash, .. } => {
7205
+ Event :: PaymentPathFailed { payment_hash, .. } => {
7206
7206
if payment_hash == dust_hash { first = true ; }
7207
7207
else { first = false ; }
7208
7208
} ,
7209
7209
_ => panic ! ( "Unexpected event" ) ,
7210
7210
}
7211
7211
match events[ 1 ] {
7212
- Event :: PaymentFailed { payment_hash, .. } => {
7212
+ Event :: PaymentPathFailed { payment_hash, .. } => {
7213
7213
if first { assert_eq ! ( payment_hash, non_dust_hash) ; }
7214
7214
else { assert_eq ! ( payment_hash, dust_hash) ; }
7215
7215
} ,
0 commit comments