Fix possible incomplete read bug on onion packet decode
[rust-lightning] / lightning / src / ln / chanmon_update_fail_tests.rs
index 770fe8139413446bcc498086d00572db696f7dbc..0d2b3b6a9f941c117c80465b7ff886f329a349ad 100644 (file)
@@ -226,7 +226,7 @@ fn do_test_simple_monitor_temporary_update_fail(disconnect: bool) {
        }
 
        // ...and make sure we can force-close a frozen channel
-       nodes[0].node.force_close_channel(&channel_id, &nodes[1].node.get_our_node_id()).unwrap();
+       nodes[0].node.force_close_broadcasting_latest_txn(&channel_id, &nodes[1].node.get_our_node_id()).unwrap();
        check_added_monitors!(nodes[0], 1);
        check_closed_broadcast!(nodes[0], true);
 
@@ -1901,9 +1901,9 @@ fn do_during_funding_monitor_fail(confirm_a_first: bool, restore_b_before_conf:
                (channel_id, create_chan_between_nodes_with_value_b(&nodes[1], &nodes[0], &channel_ready))
        };
        for node in nodes.iter() {
-               assert!(node.net_graph_msg_handler.handle_channel_announcement(&announcement).unwrap());
-               node.net_graph_msg_handler.handle_channel_update(&as_update).unwrap();
-               node.net_graph_msg_handler.handle_channel_update(&bs_update).unwrap();
+               assert!(node.gossip_sync.handle_channel_announcement(&announcement).unwrap());
+               node.gossip_sync.handle_channel_update(&as_update).unwrap();
+               node.gossip_sync.handle_channel_update(&bs_update).unwrap();
        }
 
        send_payment(&nodes[0], &[&nodes[1]], 8000000);
@@ -2541,7 +2541,7 @@ fn test_temporary_error_during_shutdown() {
        // Test that temporary failures when updating the monitor's shutdown script delay cooperative
        // close.
        let mut config = test_default_channel_config();
-       config.channel_options.commit_upfront_shutdown_pubkey = false;
+       config.channel_handshake_config.commit_upfront_shutdown_pubkey = false;
 
        let chanmon_cfgs = create_chanmon_cfgs(2);
        let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
@@ -2596,7 +2596,7 @@ fn test_permanent_error_during_sending_shutdown() {
        // Test that permanent failures when updating the monitor's shutdown script result in a force
        // close when initiating a cooperative close.
        let mut config = test_default_channel_config();
-       config.channel_options.commit_upfront_shutdown_pubkey = false;
+       config.channel_handshake_config.commit_upfront_shutdown_pubkey = false;
 
        let chanmon_cfgs = create_chanmon_cfgs(2);
        let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
@@ -2617,7 +2617,7 @@ fn test_permanent_error_during_handling_shutdown() {
        // Test that permanent failures when updating the monitor's shutdown script result in a force
        // close when handling a cooperative close.
        let mut config = test_default_channel_config();
-       config.channel_options.commit_upfront_shutdown_pubkey = false;
+       config.channel_handshake_config.commit_upfront_shutdown_pubkey = false;
 
        let chanmon_cfgs = create_chanmon_cfgs(2);
        let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);