Skip to content

Commit 4f8d985

Browse files
f require offer paths to last 3 months +
1 parent af4b780 commit 4f8d985

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lightning/src/offers/async_receive_offer_cache.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ const MAX_UPDATE_ATTEMPTS: u8 = 3;
160160
#[cfg(async_payments)]
161161
const OFFER_REFRESH_THRESHOLD: Duration = Duration::from_secs(2 * 60 * 60);
162162

163+
// Require offer paths that we receive to last at least 3 months.
163164
#[cfg(async_payments)]
164-
const MIN_OFFER_PATHS_RELATIVE_EXPIRY_SECS: u64 = 3 * 60 * 60;
165+
const MIN_OFFER_PATHS_RELATIVE_EXPIRY_SECS: u64 = 3 * 30 * 24 * 60 * 60;
165166

166167
#[cfg(async_payments)]
167168
impl AsyncReceiveOfferCache {
@@ -197,7 +198,7 @@ impl AsyncReceiveOfferCache {
197198
return false;
198199
}
199200

200-
// Require the offer that would be built using these paths to last at least a few hours.
201+
// Require the offer that would be built using these paths to last at least a few months.
201202
let min_offer_paths_absolute_expiry =
202203
duration_since_epoch.as_secs().saturating_add(MIN_OFFER_PATHS_RELATIVE_EXPIRY_SECS);
203204
let offer_paths_absolute_expiry = message.paths_absolute_expiry.unwrap_or(u64::MAX);

0 commit comments

Comments
 (0)