Rename UserConfig and LegacyChannelConfig fields
[rust-lightning] / lightning / src / ln / onion_route_tests.rs
index 51a3e048149a5b28ff966edf3c438e78efea61d8..1e340d4a15e0f06a998c541d949b808e5f5dc672 100644 (file)
@@ -262,7 +262,7 @@ fn test_fee_failures() {
        // When this test was written, the default base fee floated based on the HTLC count.
        // It is now fixed, so we simply set the fee to the expected value here.
        let mut config = test_default_channel_config();
-       config.channel_options.forwarding_fee_base_msat = 196;
+       config.channel_config.forwarding_fee_base_msat = 196;
 
        let chanmon_cfgs = create_chanmon_cfgs(3);
        let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
@@ -307,14 +307,14 @@ fn test_onion_failure() {
        // This exposed a previous bug because we were using the wrong value all the way down in
        // Channel::get_counterparty_htlc_minimum_msat().
        let mut node_2_cfg: UserConfig = Default::default();
-       node_2_cfg.own_channel_config.our_htlc_minimum_msat = 2000;
-       node_2_cfg.own_channel_config.announced_channel = true;
-       node_2_cfg.peer_channel_config_limits.force_announced_channel_preference = false;
+       node_2_cfg.channel_handshake_config.our_htlc_minimum_msat = 2000;
+       node_2_cfg.channel_handshake_config.announced_channel = true;
+       node_2_cfg.channel_handshake_limits.force_announced_channel_preference = false;
 
        // When this test was written, the default base fee floated based on the HTLC count.
        // It is now fixed, so we simply set the fee to the expected value here.
        let mut config = test_default_channel_config();
-       config.channel_options.forwarding_fee_base_msat = 196;
+       config.channel_config.forwarding_fee_base_msat = 196;
 
        let chanmon_cfgs = create_chanmon_cfgs(3);
        let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
@@ -600,7 +600,7 @@ fn test_default_to_onion_payload_tlv_format() {
        // `features` for a node in the `network_graph` exists, or when the node isn't in the
        // `network_graph`, and no other known `features` for the node exists.
        let mut priv_channels_conf = UserConfig::default();
-       priv_channels_conf.own_channel_config.announced_channel = false;
+       priv_channels_conf.channel_handshake_config.announced_channel = false;
        let chanmon_cfgs = create_chanmon_cfgs(5);
        let node_cfgs = create_node_cfgs(5, &chanmon_cfgs);
        let node_chanmgrs = create_node_chanmgrs(5, &node_cfgs, &[None, None, None, None, Some(priv_channels_conf)]);
@@ -1084,8 +1084,8 @@ fn test_phantom_dust_exposure_failure() {
        // Set the max dust exposure to the dust limit.
        let max_dust_exposure = 546;
        let mut receiver_config = UserConfig::default();
-       receiver_config.channel_options.max_dust_htlc_exposure_msat = max_dust_exposure;
-       receiver_config.own_channel_config.announced_channel = true;
+       receiver_config.channel_config.max_dust_htlc_exposure_msat = max_dust_exposure;
+       receiver_config.channel_handshake_config.announced_channel = true;
 
        let chanmon_cfgs = create_chanmon_cfgs(2);
        let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);