Merge pull request #1413 from ViktorTigerstrom/2022-04-default-to-bolt4-tlv-onions
[rust-lightning] / lightning / src / ln / chanmon_update_fail_tests.rs
index a80ddc6121f83c20861074525dc46e61adaabbc6..368b2e5ff82070baf1c45f3dc1e9fa92bdf2a987 100644 (file)
@@ -1916,6 +1916,13 @@ fn do_during_funding_monitor_fail(confirm_a_first: bool, restore_b_before_conf:
                node.gossip_sync.handle_channel_update(&bs_update).unwrap();
        }
 
+       if !restore_b_before_lock {
+               expect_channel_ready_event(&nodes[1], &nodes[0].node.get_our_node_id());
+       } else {
+               expect_channel_ready_event(&nodes[0], &nodes[1].node.get_our_node_id());
+       }
+
+
        send_payment(&nodes[0], &[&nodes[1]], 8000000);
        close_channel(&nodes[0], &nodes[1], &channel_id, funding_tx, true);
        check_closed_event!(nodes[0], 1, ClosureReason::CooperativeClosure);
@@ -2231,7 +2238,7 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
        let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
        let persister: test_utils::TestPersister;
        let new_chain_monitor: test_utils::TestChainMonitor;
-       let nodes_0_deserialized: ChannelManager<EnforcingSigner, &test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>;
+       let nodes_0_deserialized: ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>;
        let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
 
        let chan_id = create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 15_000_000, 7_000_000_000, channelmanager::provided_init_features(), channelmanager::provided_init_features()).2;
@@ -2305,7 +2312,7 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
                        nodes_0_deserialized = {
                                let mut channel_monitors = HashMap::new();
                                channel_monitors.insert(chan_0_monitor.get_funding_txo().0, &mut chan_0_monitor);
-                               <(BlockHash, ChannelManager<EnforcingSigner, &test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>)>::read(&mut nodes_0_read, ChannelManagerReadArgs {
+                               <(BlockHash, ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>)>::read(&mut nodes_0_read, ChannelManagerReadArgs {
                                        default_config: config,
                                        keys_manager,
                                        fee_estimator: node_cfgs[0].fee_estimator,
@@ -2756,7 +2763,7 @@ fn do_test_outbound_reload_without_init_mon(use_0conf: bool) {
 
        let persister: test_utils::TestPersister;
        let new_chain_monitor: test_utils::TestChainMonitor;
-       let nodes_0_deserialized: ChannelManager<EnforcingSigner, &test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>;
+       let nodes_0_deserialized: ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>;
 
        let mut chan_config = test_default_channel_config();
        chan_config.manually_accept_inbound_channels = true;
@@ -2834,7 +2841,7 @@ fn do_test_outbound_reload_without_init_mon(use_0conf: bool) {
        let mut nodes_0_read = &nodes_0_serialized[..];
        let config = UserConfig::default();
        nodes_0_deserialized = {
-               <(BlockHash, ChannelManager<EnforcingSigner, &test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>)>::read(&mut nodes_0_read, ChannelManagerReadArgs {
+               <(BlockHash, ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>)>::read(&mut nodes_0_read, ChannelManagerReadArgs {
                        default_config: config,
                        keys_manager,
                        fee_estimator: node_cfgs[0].fee_estimator,
@@ -2866,7 +2873,7 @@ fn do_test_inbound_reload_without_init_mon(use_0conf: bool, lock_commitment: boo
 
        let persister: test_utils::TestPersister;
        let new_chain_monitor: test_utils::TestChainMonitor;
-       let nodes_1_deserialized: ChannelManager<EnforcingSigner, &test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>;
+       let nodes_1_deserialized: ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>;
 
        let mut chan_config = test_default_channel_config();
        chan_config.manually_accept_inbound_channels = true;
@@ -2940,7 +2947,7 @@ fn do_test_inbound_reload_without_init_mon(use_0conf: bool, lock_commitment: boo
        let mut nodes_1_read = &nodes_1_serialized[..];
        let config = UserConfig::default();
        nodes_1_deserialized = {
-               <(BlockHash, ChannelManager<EnforcingSigner, &test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>)>::read(&mut nodes_1_read, ChannelManagerReadArgs {
+               <(BlockHash, ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestLogger>)>::read(&mut nodes_1_read, ChannelManagerReadArgs {
                        default_config: config,
                        keys_manager,
                        fee_estimator: node_cfgs[1].fee_estimator,