@@ -55,9 +55,9 @@ use crate::sync::Mutex;
55
55
pub ( crate ) const IDEMPOTENCY_TIMEOUT_TICKS : u8 = 7 ;
56
56
57
57
#[ cfg( async_payments) ]
58
- /// Relative expiration in seconds to wait for a pending outbound HTLC to a often-offline
58
+ /// The default relative expiration to wait for a pending outbound HTLC to a often-offline
59
59
/// payee to fulfill.
60
- const ASYNC_PAYMENT_TIMEOUT_SECS : u64 = 60 * 60 * 24 * 7 ;
60
+ const ASYNC_PAYMENT_TIMEOUT_RELATIVE_EXPIRY : Duration = Duration :: from_secs ( 60 * 60 * 24 * 7 ) ;
61
61
62
62
/// Stores the session_priv for each part of a payment that is still pending. For versions 0.0.102
63
63
/// and later, also stores information for retrying the payment.
@@ -104,7 +104,7 @@ pub(crate) enum PendingOutboundPayment {
104
104
invoice_request : InvoiceRequest ,
105
105
static_invoice : StaticInvoice ,
106
106
// Stale time expiration of how much time we will wait to the payment to fulfill.
107
- // Defaults to [`ASYNC_PAYMENT_TIMEOUT_SECS `].
107
+ // Defaults to [`ASYNC_PAYMENT_TIMEOUT_RELATIVE_EXPIRY `].
108
108
expiry_time : StaleExpiration ,
109
109
} ,
110
110
Retryable {
@@ -1172,7 +1172,7 @@ impl OutboundPayments {
1172
1172
abandon_with_entry ! ( entry, PaymentFailureReason :: RouteNotFound ) ;
1173
1173
return Err ( Bolt12PaymentError :: SendingFailed ( RetryableSendFailure :: OnionPacketSizeExceeded ) )
1174
1174
}
1175
- let absolute_expiry = duration_since_epoch. saturating_add ( Duration :: from_secs ( ASYNC_PAYMENT_TIMEOUT_SECS ) ) ;
1175
+ let absolute_expiry = duration_since_epoch. saturating_add ( ASYNC_PAYMENT_TIMEOUT_RELATIVE_EXPIRY ) ;
1176
1176
1177
1177
* entry. into_mut ( ) = PendingOutboundPayment :: StaticInvoiceReceived {
1178
1178
payment_hash,
0 commit comments