@@ -133,7 +133,7 @@ fn test_monitor_and_persister_update_fail() {
133
133
134
134
// Try to update ChannelMonitor
135
135
nodes[ 1 ] . node . claim_funds ( preimage) ;
136
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash, 9_000_000 ) ;
136
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash, 9_000_000 ) ;
137
137
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
138
138
139
139
let updates = get_htlc_update_msgs ! ( nodes[ 1 ] , nodes[ 0 ] . node. get_our_node_id( ) ) ;
@@ -298,7 +298,7 @@ fn do_test_monitor_temporary_update_fail(disconnect_count: usize) {
298
298
// but nodes[0] won't respond since it is frozen.
299
299
nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
300
300
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
301
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
301
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
302
302
303
303
let events_2 = nodes[ 1 ] . node . get_and_clear_pending_msg_events ( ) ;
304
304
assert_eq ! ( events_2. len( ) , 1 ) ;
@@ -1106,7 +1106,7 @@ fn test_monitor_update_fail_reestablish() {
1106
1106
1107
1107
nodes[ 2 ] . node . claim_funds ( payment_preimage) ;
1108
1108
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
1109
- expect_payment_claimed ! ( nodes[ 2 ] , payment_hash, 1_000_000 ) ;
1109
+ expect_payment_received ! ( nodes[ 2 ] , payment_hash, 1_000_000 ) ;
1110
1110
1111
1111
let mut updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
1112
1112
assert ! ( updates. update_add_htlcs. is_empty( ) ) ;
@@ -1311,7 +1311,7 @@ fn claim_while_disconnected_monitor_update_fail() {
1311
1311
1312
1312
nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
1313
1313
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1314
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1314
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1315
1315
1316
1316
nodes[ 0 ] . node . peer_connected ( & nodes[ 1 ] . node . get_our_node_id ( ) , & msgs:: Init { features : channelmanager:: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1317
1317
nodes[ 1 ] . node . peer_connected ( & nodes[ 0 ] . node . get_our_node_id ( ) , & msgs:: Init { features : channelmanager:: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
@@ -1590,7 +1590,7 @@ fn test_monitor_update_fail_claim() {
1590
1590
1591
1591
chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
1592
1592
nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
1593
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1593
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1594
1594
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1595
1595
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1596
1596
@@ -1785,7 +1785,7 @@ fn monitor_update_claim_fail_no_response() {
1785
1785
1786
1786
chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
1787
1787
nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
1788
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1788
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1789
1789
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1790
1790
1791
1791
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
@@ -2103,7 +2103,7 @@ fn test_fail_htlc_on_broadcast_after_claim() {
2103
2103
2104
2104
nodes[ 2 ] . node . claim_funds ( payment_preimage) ;
2105
2105
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2106
- expect_payment_claimed ! ( nodes[ 2 ] , payment_hash, 2000 ) ;
2106
+ expect_payment_received ! ( nodes[ 2 ] , payment_hash, 2000 ) ;
2107
2107
2108
2108
let cs_updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
2109
2109
nodes[ 1 ] . node . handle_update_fulfill_htlc ( & nodes[ 2 ] . node . get_our_node_id ( ) , & cs_updates. update_fulfill_htlcs [ 0 ] ) ;
@@ -2271,7 +2271,7 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
2271
2271
chanmon_cfgs[ 0 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
2272
2272
nodes[ 0 ] . node . claim_funds ( payment_preimage_0) ;
2273
2273
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
2274
- expect_payment_claimed ! ( nodes[ 0 ] , payment_hash_0, 100_000 ) ;
2274
+ expect_payment_received ! ( nodes[ 0 ] , payment_hash_0, 100_000 ) ;
2275
2275
2276
2276
nodes[ 1 ] . node . handle_update_add_htlc ( & nodes[ 0 ] . node . get_our_node_id ( ) , & send. msgs [ 0 ] ) ;
2277
2277
nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & send. commitment_msg ) ;
@@ -2455,7 +2455,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
2455
2455
} else {
2456
2456
nodes[ 2 ] . node . claim_funds ( payment_preimage) ;
2457
2457
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2458
- expect_payment_claimed ! ( nodes[ 2 ] , payment_hash, 100_000 ) ;
2458
+ expect_payment_received ! ( nodes[ 2 ] , payment_hash, 100_000 ) ;
2459
2459
2460
2460
let cs_updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
2461
2461
assert_eq ! ( cs_updates. update_fulfill_htlcs. len( ) , 1 ) ;
@@ -2632,15 +2632,15 @@ fn double_temp_error() {
2632
2632
// `claim_funds` results in a ChannelMonitorUpdate.
2633
2633
nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
2634
2634
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
2635
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
2635
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
2636
2636
let ( funding_tx, latest_update_1, _) = nodes[ 1 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & channel_id) . unwrap ( ) . clone ( ) ;
2637
2637
2638
2638
chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
2639
2639
// Previously, this would've panicked due to a double-call to `Channel::monitor_update_failed`,
2640
2640
// which had some asserts that prevented it from being called twice.
2641
2641
nodes[ 1 ] . node . claim_funds ( payment_preimage_2) ;
2642
2642
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
2643
- expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_2, 1_000_000 ) ;
2643
+ expect_payment_received ! ( nodes[ 1 ] , payment_hash_2, 1_000_000 ) ;
2644
2644
chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
2645
2645
2646
2646
let ( _, latest_update_2, _) = nodes[ 1 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & channel_id) . unwrap ( ) . clone ( ) ;
0 commit comments