X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fonion_route_tests.rs;h=51a3e048149a5b28ff966edf3c438e78efea61d8;hb=70ae45fea030ed1d2064918c7b023aa142387bc8;hp=eabd2222078b5a73c7456db15d65ff453a45ab05;hpb=6e00c28a55006be93e26b145d8670c594144c785;p=rust-lightning diff --git a/lightning/src/ln/onion_route_tests.rs b/lightning/src/ln/onion_route_tests.rs index eabd2222..51a3e048 100644 --- a/lightning/src/ln/onion_route_tests.rs +++ b/lightning/src/ln/onion_route_tests.rs @@ -308,7 +308,7 @@ fn test_onion_failure() { // 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.channel_options.announced_channel = true; + node_2_cfg.own_channel_config.announced_channel = true; node_2_cfg.peer_channel_config_limits.force_announced_channel_preference = false; // When this test was written, the default base fee floated based on the HTLC count. @@ -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.channel_options.announced_channel = false; + priv_channels_conf.own_channel_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)]); @@ -854,7 +854,7 @@ fn test_phantom_onion_hmac_failure() { .blamed_scid(phantom_scid) .blamed_chan_closed(true) .expected_htlc_error_data(0x8000 | 0x4000 | 5, &sha256_of_onion); - expect_payment_failed_conditions!(nodes[0], payment_hash, false, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, false, fail_conditions); } #[test] @@ -927,7 +927,7 @@ fn test_phantom_invalid_onion_payload() { .blamed_scid(phantom_scid) .blamed_chan_closed(true) .expected_htlc_error_data(0x4000 | 22, &error_data); - expect_payment_failed_conditions!(nodes[0], payment_hash, true, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, true, fail_conditions); } #[test] @@ -983,7 +983,7 @@ fn test_phantom_final_incorrect_cltv_expiry() { let mut fail_conditions = PaymentFailedConditions::new() .blamed_scid(phantom_scid) .expected_htlc_error_data(18, &error_data); - expect_payment_failed_conditions!(nodes[0], payment_hash, false, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, false, fail_conditions); } #[test] @@ -1028,7 +1028,7 @@ fn test_phantom_failure_too_low_cltv() { let mut fail_conditions = PaymentFailedConditions::new() .blamed_scid(phantom_scid) .expected_htlc_error_data(17, &error_data); - expect_payment_failed_conditions!(nodes[0], payment_hash, false, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, false, fail_conditions); } #[test] @@ -1076,7 +1076,7 @@ fn test_phantom_failure_too_low_recv_amt() { let mut fail_conditions = PaymentFailedConditions::new() .blamed_scid(phantom_scid) .expected_htlc_error_data(0x4000 | 15, &error_data); - expect_payment_failed_conditions!(nodes[0], payment_hash, true, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, true, fail_conditions); } #[test] @@ -1085,7 +1085,7 @@ fn test_phantom_dust_exposure_failure() { 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.channel_options.announced_channel = true; + receiver_config.own_channel_config.announced_channel = true; let chanmon_cfgs = create_chanmon_cfgs(2); let node_cfgs = create_node_cfgs(2, &chanmon_cfgs); @@ -1123,7 +1123,7 @@ fn test_phantom_dust_exposure_failure() { .blamed_scid(channel.0.contents.short_channel_id) .blamed_chan_closed(false) .expected_htlc_error_data(0x1000 | 7, &err_data); - expect_payment_failed_conditions!(nodes[0], payment_hash, false, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, false, fail_conditions); } #[test] @@ -1174,5 +1174,5 @@ fn test_phantom_failure_reject_payment() { let mut fail_conditions = PaymentFailedConditions::new() .blamed_scid(phantom_scid) .expected_htlc_error_data(0x4000 | 15, &error_data); - expect_payment_failed_conditions!(nodes[0], payment_hash, true, fail_conditions); + expect_payment_failed_conditions(&nodes[0], payment_hash, true, fail_conditions); }