Skip to content

Commit c59150a

Browse files
authored
Merge pull request #1997 from Kurtsley/fix-clean-up-documentation
Clean up documentation in the create_phantom_invoice functions
2 parents 8ecd7c3 + 342741a commit c59150a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lightning-invoice/src/utils.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ use core::time::Duration;
4040
/// `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
4141
/// in excess of the current time.
4242
///
43-
/// 'duration_since_epoch' is the current time since epoch in seconds.
44-
///
45-
/// ['std::time::SystemTime'] has been removed to allow this function to be used in a 'no_std' environment,
46-
/// where [`std::time::SystemTime`] is not available and the current time is supplied by the caller.
43+
/// `duration_since_epoch` is the current time since epoch in seconds.
4744
///
4845
/// You can specify a custom `min_final_cltv_expiry_delta`, or let LDK default it to
4946
/// [`MIN_FINAL_CLTV_EXPIRY_DELTA`]. The provided expiry must be at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`] - 3.
@@ -60,6 +57,9 @@ use core::time::Duration;
6057
/// [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
6158
/// [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
6259
/// [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
60+
///
61+
/// This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
62+
/// available and the current time is supplied by the caller.
6363
pub fn create_phantom_invoice<ES: Deref, NS: Deref, L: Deref>(
6464
amt_msat: Option<u64>, payment_hash: Option<PaymentHash>, description: String,
6565
invoice_expiry_delta_secs: u32, phantom_route_hints: Vec<PhantomRouteHints>, entropy_source: ES,
@@ -100,10 +100,7 @@ where
100100
/// `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
101101
/// in excess of the current time.
102102
///
103-
/// 'duration_since_epoch' is the current time since epoch in seconds.
104-
///
105-
/// ['std::time::SystemTime'] has been removed to allow this function to be used in a 'no_std' environment,
106-
/// where [`std::time::SystemTime`] is not available and the current time is supplied by the caller.
103+
/// `duration_since_epoch` is the current time since epoch in seconds.
107104
///
108105
/// Note that the provided `keys_manager`'s `NodeSigner` implementation must support phantom
109106
/// invoices in its `sign_invoice` implementation ([`PhantomKeysManager`] satisfies this
@@ -114,6 +111,9 @@ where
114111
/// [`ChannelManager::create_inbound_payment`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment
115112
/// [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
116113
/// [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
114+
///
115+
/// This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
116+
/// available and the current time is supplied by the caller.
117117
pub fn create_phantom_invoice_with_description_hash<ES: Deref, NS: Deref, L: Deref>(
118118
amt_msat: Option<u64>, payment_hash: Option<PaymentHash>, invoice_expiry_delta_secs: u32,
119119
description_hash: Sha256, phantom_route_hints: Vec<PhantomRouteHints>, entropy_source: ES,

0 commit comments

Comments
 (0)