X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchanmon_update_fail_tests.rs;h=368b2e5ff82070baf1c45f3dc1e9fa92bdf2a987;hb=4d914b5b36eadb7bbbe61d03bcab31e1cbf2c72b;hp=a80ddc6121f83c20861074525dc46e61adaabbc6;hpb=a10223d1ff874c293622a433eb2b23568435330d;p=rust-lightning diff --git a/lightning/src/ln/chanmon_update_fail_tests.rs b/lightning/src/ln/chanmon_update_fail_tests.rs index a80ddc61..368b2e5f 100644 --- a/lightning/src/ln/chanmon_update_fail_tests.rs +++ b/lightning/src/ln/chanmon_update_fail_tests.rs @@ -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; + 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)>::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; + 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)>::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; + 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)>::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,