We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 716758f commit e9051f8Copy full SHA for e9051f8
lightning/src/ln/channelmanager.rs
@@ -9268,6 +9268,10 @@ where
9268
SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)
9269
.expect("SystemTime::now() should be after SystemTime::UNIX_EPOCH")
9270
};
9271
+
9272
+ // This may be up to 2 hours in the future because of bitcoin's block time rule or about
9273
+ // 10-30 minutes in the past if a block hasn't been found recently. This should be fine as
9274
+ // the default invoice expiration is 2 hours, though shorter expirations may be problematic.
9275
#[cfg(not(feature = "std"))]
9276
let duration_since_epoch =
9277
Duration::from_secs(self.highest_seen_timestamp.load(Ordering::Acquire) as u64);
0 commit comments