@@ -828,7 +828,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
828
828
829
829
// Fail the payment backwards, failing the monitor update on nodes[1]'s receipt of the RAA
830
830
assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & payment_hash_1) ) ;
831
- expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
831
+ expect_pending_htlcs_forwardable ! ( nodes[ 2 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
832
832
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
833
833
834
834
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -909,7 +909,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
909
909
let ( outpoint, latest_update, _) = nodes[ 1 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & chan_2. 2 ) . unwrap ( ) . clone ( ) ;
910
910
nodes[ 1 ] . chain_monitor . chain_monitor . force_channel_monitor_updated ( outpoint, latest_update) ;
911
911
check_added_monitors ! ( nodes[ 1 ] , 0 ) ;
912
- expect_pending_htlcs_forwardable ! ( nodes[ 1 ] ) ;
912
+ expect_pending_htlcs_forwardable ! ( nodes[ 1 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
913
913
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
914
914
915
915
let mut events_3 = nodes[ 1 ] . node . get_and_clear_pending_msg_events ( ) ;
@@ -1689,7 +1689,7 @@ fn test_monitor_update_on_pending_forwards() {
1689
1689
1690
1690
let ( _, payment_hash_1, _) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1000000 ) ;
1691
1691
assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & payment_hash_1) ) ;
1692
- expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
1692
+ expect_pending_htlcs_forwardable ! ( nodes[ 2 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
1693
1693
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
1694
1694
1695
1695
let cs_fail_update = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -1710,7 +1710,7 @@ fn test_monitor_update_on_pending_forwards() {
1710
1710
commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 2 ] , payment_event. commitment_msg, false ) ;
1711
1711
1712
1712
chanmon_cfgs[ 1 ] . persister . set_update_ret ( Err ( ChannelMonitorUpdateErr :: TemporaryFailure ) ) ;
1713
- expect_pending_htlcs_forwardable ! ( nodes[ 1 ] ) ;
1713
+ expect_pending_htlcs_forwardable ! ( nodes[ 1 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
1714
1714
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1715
1715
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1716
1716
nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
@@ -2094,7 +2094,7 @@ fn test_fail_htlc_on_broadcast_after_claim() {
2094
2094
check_closed_broadcast ! ( nodes[ 1 ] , true ) ;
2095
2095
connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 1 ) ;
2096
2096
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
2097
- expect_pending_htlcs_forwardable ! ( nodes[ 1 ] ) ;
2097
+ expect_pending_htlcs_forwardable ! ( nodes[ 1 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
2098
2098
2099
2099
nodes[ 0 ] . node . handle_update_fulfill_htlc ( & nodes[ 1 ] . node . get_our_node_id ( ) , & bs_updates. update_fulfill_htlcs [ 0 ] ) ;
2100
2100
expect_payment_sent_without_paths ! ( nodes[ 0 ] , payment_preimage) ;
@@ -2456,7 +2456,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
2456
2456
} ;
2457
2457
if second_fails {
2458
2458
assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & payment_hash) ) ;
2459
- expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2459
+ expect_pending_htlcs_forwardable ! ( nodes[ 2 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
2460
2460
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2461
2461
get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
2462
2462
} else {
@@ -2490,7 +2490,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
2490
2490
2491
2491
if second_fails {
2492
2492
reconnect_nodes ( & nodes[ 1 ] , & nodes[ 2 ] , ( false , false ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 1 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( false , false ) ) ;
2493
- expect_pending_htlcs_forwardable ! ( nodes[ 1 ] ) ;
2493
+ expect_pending_htlcs_forwardable ! ( nodes[ 1 ] , PaymentForwardedFailedConditions :: new ( ) . payment_forwarding_failed ( ) ) ;
2494
2494
} else {
2495
2495
reconnect_nodes ( & nodes[ 1 ] , & nodes[ 2 ] , ( false , false ) , ( 0 , 0 ) , ( 1 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( false , false ) ) ;
2496
2496
}
0 commit comments