[dependencies]
bitcoin = "0.27"
-lightning = { version = "0.0.103", path = "../lightning", features = ["allow_wallclock_use"] }
+lightning = { version = "0.0.103", path = "../lightning", features = ["std"] }
lightning-persister = { version = "0.0.103", path = "../lightning-persister" }
[dev-dependencies]
"""
[features]
-allow_wallclock_use = []
fuzztarget = ["bitcoin/fuzztarget", "regex"]
# Internal test utilities exposed to other repo crates
_test_utils = ["hex", "regex", "bitcoin/bitcoinconsensus"]
version = "0.27"
default-features = false
features = ["bitcoinconsensus", "secp-recovery"]
-
-[package.metadata.docs.rs]
-features = ["allow_wallclock_use"] # When https://github.com/rust-lang/rust/issues/43781 complies with our MSVR, we can add nice banners in the docs for the methods behind this feature-gate.
use sync::{Arc, Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard};
use core::sync::atomic::{AtomicUsize, Ordering};
use core::time::Duration;
-#[cfg(any(test, feature = "allow_wallclock_use"))]
-use std::time::Instant;
use core::ops::Deref;
+#[cfg(any(test, feature = "std"))]
+use std::time::Instant;
+
// We hold various information about HTLC relay in the HTLC objects in Channel itself:
//
// Upon receipt of an HTLC from a peer, we'll give it a PendingHTLCStatus indicating if it should
/// indicating whether persistence is necessary. Only one listener on
/// `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
/// up.
- /// Note that the feature `allow_wallclock_use` must be enabled to use this function.
- #[cfg(any(test, feature = "allow_wallclock_use"))]
+ ///
+ /// Note that this method is not available with the `no-std` feature.
+ #[cfg(any(test, feature = "std"))]
pub fn await_persistable_update_timeout(&self, max_wait: Duration) -> bool {
self.persistence_notifier.wait_timeout(max_wait)
}
}
}
- #[cfg(any(test, feature = "allow_wallclock_use"))]
+ #[cfg(any(test, feature = "std"))]
fn wait_timeout(&self, max_wait: Duration) -> bool {
let current_time = Instant::now();
loop {