X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fpayment_tests.rs;h=0db815a708532f590d5d7821d2f0bc156e03ad8f;hb=76fff953bd2cc86a932500036bb72a221ac31808;hp=73cdf59bbb699fb6966ad964ac99d6f00f3efeb9;hpb=4b70921c958181e43dc056dc05ef59427d13f2af;p=rust-lightning diff --git a/lightning/src/ln/payment_tests.rs b/lightning/src/ln/payment_tests.rs index 73cdf59b..0db815a7 100644 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@ -42,10 +42,12 @@ use crate::prelude::*; use crate::ln::functional_test_utils; use crate::ln::functional_test_utils::*; use crate::routing::gossip::NodeId; + #[cfg(feature = "std")] -use std::time::{SystemTime, Instant, Duration}; -#[cfg(not(feature = "no-std"))] -use crate::util::time::tests::SinceEpoch; +use { + crate::util::time::tests::SinceEpoch, + std::time::{SystemTime, Instant, Duration}, +}; #[test] fn mpp_failure() { @@ -2313,7 +2315,7 @@ fn do_automatic_retries(test: AutoRetry) { let mut msg_events = nodes[0].node.get_and_clear_pending_msg_events(); assert_eq!(msg_events.len(), 0); } else if test == AutoRetry::FailTimeout { - #[cfg(not(feature = "no-std"))] { + #[cfg(feature = "std")] { // Ensure ChannelManager will not retry a payment if it times out due to Retry::Timeout. nodes[0].node.send_payment(payment_hash, RecipientOnionFields::secret_only(payment_secret), PaymentId(payment_hash.0), route_params, Retry::Timeout(Duration::from_secs(60))).unwrap();