@@ -324,7 +324,6 @@ fn do_test_monitor_temporary_update_fail(disconnect_count: usize) {
324324 nodes[ 0 ] . node . handle_commitment_signed ( & nodes[ 1 ] . node . get_our_node_id ( ) , commitment_signed) ;
325325 check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
326326 assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
327- nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
328327 }
329328
330329 ( update_fulfill_htlcs[ 0 ] . clone ( ) , commitment_signed. clone ( ) )
@@ -633,7 +632,6 @@ fn test_monitor_update_fail_cs() {
633632 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
634633 nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & send_event. commitment_msg ) ;
635634 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
636- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
637635 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
638636 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
639637
@@ -664,7 +662,6 @@ fn test_monitor_update_fail_cs() {
664662 chanmon_cfgs[ 0 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
665663 nodes[ 0 ] . node . handle_commitment_signed ( & nodes[ 1 ] . node . get_our_node_id ( ) , & updates. commitment_signed ) ;
666664 assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
667- nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
668665 check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
669666 assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
670667 } ,
@@ -726,7 +723,6 @@ fn test_monitor_update_fail_no_rebroadcast() {
726723 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
727724 nodes[ 1 ] . node . handle_revoke_and_ack ( & nodes[ 0 ] . node . get_our_node_id ( ) , & bs_raa) ;
728725 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
729- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
730726 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
731727 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_events( ) . is_empty( ) ) ;
732728 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
@@ -784,12 +780,11 @@ fn test_monitor_update_raa_while_paused() {
784780 nodes[ 0 ] . node . handle_update_add_htlc ( & nodes[ 1 ] . node . get_our_node_id ( ) , & send_event_2. msgs [ 0 ] ) ;
785781 nodes[ 0 ] . node . handle_commitment_signed ( & nodes[ 1 ] . node . get_our_node_id ( ) , & send_event_2. commitment_msg ) ;
786782 assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
787- nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
788783 check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
784+ assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
789785
790786 nodes[ 0 ] . node . handle_revoke_and_ack ( & nodes[ 1 ] . node . get_our_node_id ( ) , & bs_raa) ;
791787 assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
792- nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Existing pending monitor update prevented responses to RAA" . to_string ( ) , 1 ) ;
793788 check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
794789
795790 chanmon_cfgs[ 0 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
@@ -875,7 +870,6 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
875870 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
876871 nodes[ 1 ] . node . handle_revoke_and_ack ( & nodes[ 2 ] . node . get_our_node_id ( ) , & bs_revoke_and_ack) ;
877872 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
878- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
879873 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_events( ) . is_empty( ) ) ;
880874 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
881875 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
@@ -911,8 +905,6 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
911905 nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 2 ] . node . get_our_node_id ( ) , & send_event. commitment_msg ) ;
912906 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
913907 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
914- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
915- assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
916908 ( Some ( payment_preimage_4) , Some ( payment_hash_4) )
917909 } else { ( None , None ) } ;
918910
@@ -1136,7 +1128,6 @@ fn test_monitor_update_fail_reestablish() {
11361128 get_event_msg!( nodes[ 0 ] , MessageSendEvent :: SendChannelUpdate , nodes[ 1 ] . node. get_our_node_id( ) )
11371129 . contents. flags & 2 , 0 ) ; // The "disabled" bit should be unset as we just reconnected
11381130
1139- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
11401131 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
11411132
11421133 nodes[ 1 ] . node . peer_disconnected ( & nodes[ 0 ] . node . get_our_node_id ( ) , false ) ;
@@ -1228,12 +1219,11 @@ fn raa_no_response_awaiting_raa_state() {
12281219 nodes[ 1 ] . node . handle_update_add_htlc ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
12291220 nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. commitment_msg ) ;
12301221 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1231- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
12321222 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
1223+ assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
12331224
12341225 nodes[ 1 ] . node . handle_revoke_and_ack ( & nodes[ 0 ] . node . get_our_node_id ( ) , & as_raa) ;
12351226 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1236- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Existing pending monitor update prevented responses to RAA" . to_string ( ) , 1 ) ;
12371227 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
12381228
12391229 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
@@ -1331,7 +1321,6 @@ fn claim_while_disconnected_monitor_update_fail() {
13311321
13321322 nodes[ 1 ] . node . handle_channel_reestablish ( & nodes[ 0 ] . node . get_our_node_id ( ) , & as_reconnect) ;
13331323 let _bs_channel_update = get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendChannelUpdate , nodes[ 0 ] . node. get_our_node_id( ) ) ;
1334- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
13351324 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
13361325 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
13371326
@@ -1348,7 +1337,6 @@ fn claim_while_disconnected_monitor_update_fail() {
13481337 nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & as_updates. commitment_signed ) ;
13491338 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
13501339 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1351- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
13521340 // Note that nodes[1] not updating monitor here is OK - it wont take action on the new HTLC
13531341 // until we've channel_monitor_update'd and updated for the new commitment transaction.
13541342
@@ -1440,7 +1428,6 @@ fn monitor_failed_no_reestablish_response() {
14401428 nodes[ 1 ] . node . handle_update_add_htlc ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. msgs [ 0 ] ) ;
14411429 nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. commitment_msg ) ;
14421430 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1443- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
14441431 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
14451432
14461433 // Now disconnect and immediately reconnect, delivering the channel_reestablish while nodes[1]
@@ -1540,7 +1527,6 @@ fn first_message_on_recv_ordering() {
15401527 // to the next message also tests resetting the delivery order.
15411528 nodes[ 1 ] . node . handle_revoke_and_ack ( & nodes[ 0 ] . node . get_our_node_id ( ) , & as_raa) ;
15421529 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1543- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
15441530 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
15451531
15461532 // Now deliver the update_add_htlc/commitment_signed for the second payment, which does need an
@@ -1550,7 +1536,6 @@ fn first_message_on_recv_ordering() {
15501536 nodes[ 1 ] . node . handle_commitment_signed ( & nodes[ 0 ] . node . get_our_node_id ( ) , & payment_event. commitment_msg ) ;
15511537 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
15521538 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1553- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Previous monitor update failure prevented generation of RAA" . to_string ( ) , 1 ) ;
15541539
15551540 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
15561541 let ( outpoint, latest_update, _) = nodes[ 1 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & channel_id) . unwrap ( ) . clone ( ) ;
@@ -1599,7 +1584,7 @@ fn test_monitor_update_fail_claim() {
15991584 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
16001585 nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
16011586 expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
1602- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Temporary failure claiming HTLC, treating as success: Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
1587+ assert ! ( nodes[ 1 ] . node . get_and_clear_pending_msg_events ( ) . is_empty ( ) ) ;
16031588 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
16041589
16051590 // Note that at this point there is a pending commitment transaction update for A being held by
@@ -1730,7 +1715,6 @@ fn test_monitor_update_on_pending_forwards() {
17301715 expect_pending_htlcs_forwardable_and_htlc_handling_failed ! ( nodes[ 1 ] , vec![ HTLCDestination :: NextHopChannel { node_id: Some ( nodes[ 2 ] . node. get_our_node_id( ) ) , channel_id: chan_2. 2 } ] ) ;
17311716 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
17321717 assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1733- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
17341718
17351719 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
17361720 let ( outpoint, latest_update, _) = nodes[ 1 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & chan_1. 2 ) . unwrap ( ) . clone ( ) ;
@@ -1791,9 +1775,7 @@ fn monitor_update_claim_fail_no_response() {
17911775 expect_payment_claimed ! ( nodes[ 1 ] , payment_hash_1, 1_000_000 ) ;
17921776 check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
17931777
1794- let events = nodes[ 1 ] . node . get_and_clear_pending_msg_events ( ) ;
1795- assert_eq ! ( events. len( ) , 0 ) ;
1796- nodes[ 1 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Temporary failure claiming HTLC, treating as success: Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
1778+ assert ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
17971779
17981780 chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
17991781 let ( outpoint, latest_update, _) = nodes[ 1 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & channel_id) . unwrap ( ) . clone ( ) ;
@@ -1841,9 +1823,8 @@ fn do_during_funding_monitor_fail(confirm_a_first: bool, restore_b_before_conf:
18411823
18421824 chanmon_cfgs[ 0 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
18431825 nodes[ 0 ] . node . handle_funding_signed ( & nodes[ 1 ] . node . get_our_node_id ( ) , & get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendFundingSigned , nodes[ 0 ] . node. get_our_node_id( ) ) ) ;
1844- assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
1845- nodes[ 0 ] . logger . assert_log ( "lightning::ln::channelmanager" . to_string ( ) , "Failed to update ChannelMonitor" . to_string ( ) , 1 ) ;
18461826 check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
1827+ assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
18471828 assert ! ( nodes[ 0 ] . node. get_and_clear_pending_events( ) . is_empty( ) ) ;
18481829 chanmon_cfgs[ 0 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: Completed ) ;
18491830 let ( outpoint, latest_update, _) = nodes[ 0 ] . chain_monitor . latest_monitor_update_id . lock ( ) . unwrap ( ) . get ( & channel_id) . unwrap ( ) . clone ( ) ;
0 commit comments