mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix: Prevent u64 timestamp wrap-around in LocalMiner (#18791)
This commit is contained in:
@@ -194,7 +194,7 @@ where
|
||||
/// through newPayload.
|
||||
async fn advance(&mut self) -> eyre::Result<()> {
|
||||
let timestamp = std::cmp::max(
|
||||
self.last_timestamp + 1,
|
||||
self.last_timestamp.saturating_add(1),
|
||||
std::time::SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.expect("cannot be earlier than UNIX_EPOCH")
|
||||
|
||||
Reference in New Issue
Block a user