X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fpayment_tests.rs;h=15870dc57132001b58af8da323876c5358a3cc0d;hb=a1c30041360905e5edcb343447cf1d5872188914;hp=6af0e63c98bf421bade346f89f1fff303f48e764;hpb=0dbf17b78116f175742ad10d2f50cc3dc0277864;p=rust-lightning diff --git a/lightning/src/ln/payment_tests.rs b/lightning/src/ln/payment_tests.rs index 6af0e63c..15870dc5 100644 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@ -43,10 +43,9 @@ use crate::ln::functional_test_utils; use crate::ln::functional_test_utils::*; use crate::routing::gossip::NodeId; #[cfg(feature = "std")] -use { - crate::util::time::tests::SinceEpoch, - std::time::{SystemTime, Instant, Duration} -}; +use std::time::{SystemTime, Instant, Duration}; +#[cfg(feature = "std")] +use crate::util::time::tests::SinceEpoch; #[test] fn mpp_failure() { @@ -2314,7 +2313,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();