impl Deref for EmptyNodeIdLookUp
[rust-lightning] / lightning / src / ln / onion_route_tests.rs
index aeb175bc62660b6091c0a71a3960e4dc6ca1bc5e..f498473005757fad1962827f5b465773828e9a8c 100644 (file)
 use crate::chain::channelmonitor::{CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS};
 use crate::sign::{EntropySource, NodeSigner, Recipient};
 use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentFailureReason};
-use crate::ln::{PaymentHash, PaymentSecret};
+use crate::ln::types::{PaymentHash, PaymentSecret};
 use crate::ln::channel::EXPIRE_PREV_CONFIG_TICKS;
 use crate::ln::channelmanager::{HTLCForwardInfo, FailureCode, CLTV_FAR_FAR_AWAY, DISABLE_GOSSIP_TICKS, MIN_CLTV_EXPIRY_DELTA, PendingAddHTLCInfo, PendingHTLCInfo, PendingHTLCRouting, PaymentId, RecipientOnionFields};
 use crate::ln::onion_utils;
 use crate::routing::gossip::{NetworkUpdate, RoutingFees};
 use crate::routing::router::{get_route, PaymentParameters, Route, RouteParameters, RouteHint, RouteHintHop};
 use crate::ln::features::{InitFeatures, Bolt11InvoiceFeatures};
+use crate::ln::functional_test_utils::test_default_channel_config;
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, ChannelUpdate, OutboundTrampolinePayload};
 use crate::ln::wire::Encode;
@@ -328,7 +329,7 @@ fn test_onion_failure() {
        // to 2000, which is above the default value of 1000 set in create_node_chanmgrs.
        // 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();
+       let mut node_2_cfg: UserConfig = test_default_channel_config();
        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;