X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fshutdown_tests.rs;h=782a991535f6f6e927aef9479260902d4df2f618;hb=e818c4b13fcfc125dd3f3f1e86b49ddf299a85b4;hp=ee6a6afb6ecda2ae2a919a610b9ba9e978d5e5e9;hpb=d70124cec4e7dede1c8918536c19a22cbc9e7279;p=rust-lightning diff --git a/lightning/src/ln/shutdown_tests.rs b/lightning/src/ln/shutdown_tests.rs index ee6a6afb6..782a99153 100644 --- a/lightning/src/ln/shutdown_tests.rs +++ b/lightning/src/ln/shutdown_tests.rs @@ -16,7 +16,8 @@ use crate::chain::transaction::OutPoint; use crate::events::{Event, MessageSendEvent, HTLCDestination, MessageSendEventsProvider, ClosureReason}; use crate::ln::channelmanager::{self, PaymentSendFailure, PaymentId, RecipientOnionFields, Retry, ChannelShutdownState, ChannelDetails}; use crate::routing::router::{PaymentParameters, get_route, RouteParameters}; -use crate::ln::{ChannelId, msgs}; +use crate::ln::msgs; +use crate::ln::types::ChannelId; use crate::ln::msgs::{ChannelMessageHandler, ErrorAction}; use crate::ln::onion_utils::INVALID_ONION_BLINDING; use crate::ln::script::ShutdownScript; @@ -25,6 +26,7 @@ use crate::util::test_utils::OnGetShutdownScriptpubkey; use crate::util::errors::APIError; use crate::util::config::UserConfig; use crate::util::string::UntrustedString; +use crate::prelude::*; use bitcoin::{Transaction, TxOut}; use bitcoin::blockdata::locktime::absolute::LockTime; @@ -33,11 +35,6 @@ use bitcoin::blockdata::opcodes; use bitcoin::network::constants::Network; use bitcoin::address::{WitnessProgram, WitnessVersion}; -use regex; - -use core::default::Default; -use std::convert::TryFrom; - use crate::ln::functional_test_utils::*; #[test] @@ -437,7 +434,7 @@ fn do_htlc_fail_async_shutdown(blinded_recipient: bool) { let (_, our_payment_hash, our_payment_secret) = get_payment_preimage_hash(&nodes[2], Some(amt_msat), None); let route_params = if blinded_recipient { crate::ln::blinded_payment_tests::get_blinded_route_parameters( - amt_msat, our_payment_secret, + amt_msat, our_payment_secret, 1, 100000000, nodes.iter().skip(1).map(|n| n.node.get_our_node_id()).collect(), &[&chan_2.0.contents], &chanmon_cfgs[2].keys_manager) } else {