projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2068 from jkczyz/2023-03-doc-fixes
[rust-lightning]
/
lightning
/
src
/
ln
/
outbound_payment.rs
diff --git
a/lightning/src/ln/outbound_payment.rs
b/lightning/src/ln/outbound_payment.rs
index 33ccecb4ca858b17c45321b3a17c2303e6931587..86b4de768f830172d1caf411b5670667be60923e 100644
(file)
--- a/
lightning/src/ln/outbound_payment.rs
+++ b/
lightning/src/ln/outbound_payment.rs
@@
-276,7
+276,11
@@
pub(crate) struct PaymentAttemptsUsingTime<T: Time> {
/// it means the result of the first attempt is not known yet.
pub(crate) count: usize,
/// This field is only used when retry is `Retry::Timeout` which is only build with feature std
/// it means the result of the first attempt is not known yet.
pub(crate) count: usize,
/// This field is only used when retry is `Retry::Timeout` which is only build with feature std
- first_attempted_at: T
+ #[cfg(not(feature = "no-std"))]
+ first_attempted_at: T,
+ #[cfg(feature = "no-std")]
+ phantom: core::marker::PhantomData<T>,
+
}
#[cfg(not(any(feature = "no-std", test)))]
}
#[cfg(not(any(feature = "no-std", test)))]
@@
-290,7
+294,10
@@
impl<T: Time> PaymentAttemptsUsingTime<T> {
pub(crate) fn new() -> Self {
PaymentAttemptsUsingTime {
count: 0,
pub(crate) fn new() -> Self {
PaymentAttemptsUsingTime {
count: 0,
- first_attempted_at: T::now()
+ #[cfg(not(feature = "no-std"))]
+ first_attempted_at: T::now(),
+ #[cfg(feature = "no-std")]
+ phantom: core::marker::PhantomData,
}
}
}
}
}
}