@@ -200,6 +200,7 @@ fn do_test_monitor_temporary_update_fail(disconnect_count: usize) {
200
200
}
201
201
202
202
nodes[ 0 ] . node . handle_commitment_signed ( & nodes[ 1 ] . node . get_our_node_id ( ) , commitment_signed) ;
203
+ check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
203
204
assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
204
205
nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
205
206
}
@@ -788,6 +789,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
788
789
send_event = SendEvent :: from_event ( nodes[ 2 ] . node . get_and_clear_pending_msg_events ( ) . remove ( 0 ) ) ;
789
790
nodes[ 1 ] . node . handle_update_add_htlc ( & nodes[ 2 ] . node . get_our_node_id ( ) , & send_event. msgs [ 0 ] ) ;
790
791
nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 2 ] . node . get_our_node_id ( ) , & send_event. commitment_msg ) ;
792
+ check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
791
793
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
792
794
nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
793
795
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
@@ -1171,6 +1173,7 @@ fn claim_while_disconnected_monitor_update_fail() {
1171
1173
let as_updates = get_htlc_update_msgs ! ( nodes[ 0 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
1172
1174
nodes[ 1 ] . node . handle_update_add_htlc ( & nodes[ 0 ] . node . get_our_node_id ( ) , & as_updates. update_add_htlcs [ 0 ] ) ;
1173
1175
nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & as_updates. commitment_signed ) ;
1176
+ check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1174
1177
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1175
1178
nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
1176
1179
// Note that nodes[1] not updating monitor here is OK - it wont take action on the new HTLC
@@ -1366,6 +1369,7 @@ fn first_message_on_recv_ordering() {
1366
1369
// the appropriate HTLC acceptance).
1367
1370
nodes[ 1 ] . node . handle_update_add_htlc ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
1368
1371
nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. commitment_msg ) ;
1372
+ check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1369
1373
assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1370
1374
nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
1371
1375
@@ -1643,7 +1647,7 @@ fn do_during_funding_monitor_fail(fail_on_generate: bool, restore_between_fails:
1643
1647
assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1644
1648
if fail_on_generate && !restore_between_fails {
1645
1649
nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented funding_signed from allowing funding broadcast" . to_string ( ) , 1 ) ;
1646
- check_added_monitors ! ( nodes[ 0 ] , 0 ) ;
1650
+ check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
1647
1651
} else {
1648
1652
nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
1649
1653
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
0 commit comments