Skip to content

Commit c0d920c

Browse files
valentinewallacetnull
authored andcommitted
Fix outdated static invoice docs.
1 parent 3c55cf7 commit c0d920c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/offers/static_invoice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use crate::offers::invoice::is_expired;
4949
use crate::prelude::*;
5050

5151
/// Static invoices default to expiring after 2 weeks.
52-
const DEFAULT_RELATIVE_EXPIRY: Duration = Duration::from_secs(3600 * 24 * 14);
52+
pub const DEFAULT_RELATIVE_EXPIRY: Duration = Duration::from_secs(3600 * 24 * 14);
5353

5454
/// Tag for the hash function used when signing a [`StaticInvoice`]'s merkle root.
5555
pub const SIGNATURE_TAG: &'static str = concat!("lightning", "static_invoice", "signature");
@@ -102,8 +102,8 @@ pub struct StaticInvoiceBuilder<'a> {
102102
impl<'a> StaticInvoiceBuilder<'a> {
103103
/// Initialize a [`StaticInvoiceBuilder`] from the given [`Offer`].
104104
///
105-
/// Unless [`StaticInvoiceBuilder::relative_expiry`] is set, the invoice will expire 24 hours
106-
/// after `created_at`.
105+
/// The invoice's expiration will default to [`DEFAULT_RELATIVE_EXPIRY`] after `created_at` unless
106+
/// overridden by [`StaticInvoiceBuilder::relative_expiry`].
107107
pub fn for_offer_using_derived_keys<T: secp256k1::Signing>(
108108
offer: &'a Offer, payment_paths: Vec<BlindedPaymentPath>,
109109
message_paths: Vec<BlindedMessagePath>, created_at: Duration, expanded_key: &ExpandedKey,

0 commit comments

Comments
 (0)