We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26a44c2 commit 6002032Copy full SHA for 6002032
lightning-invoice/src/lib.rs
@@ -936,11 +936,7 @@ impl PositiveTimestamp {
936
///
937
/// Otherwise, returns a [`CreationError::TimestampOutOfBounds`].
938
pub fn from_unix_timestamp(unix_seconds: u64) -> Result<Self, CreationError> {
939
- if unix_seconds > MAX_TIMESTAMP {
940
- Err(CreationError::TimestampOutOfBounds)
941
- } else {
942
- Ok(PositiveTimestamp(Duration::from_secs(unix_seconds)))
943
- }
+ Self::from_duration_since_epoch(Duration::from_secs(unix_seconds))
944
}
945
946
/// Creates a `PositiveTimestamp` from a [`SystemTime`] with a corresponding unix timestamp in
0 commit comments