fix(hive): overflow when timestamp is u64::max (#14132)

This commit is contained in:
joshieDo
2025-01-31 20:53:48 +00:00
committed by GitHub
parent 3e0cd2eb3d
commit d30a1b6c7d
2 changed files with 8 additions and 7 deletions

View File

@ -111,7 +111,7 @@ pub trait LoadPendingBlock:
.next_evm_env(
&latest,
NextBlockEnvAttributes {
timestamp: latest.timestamp() + 12,
timestamp: latest.timestamp().saturating_add(12),
suggested_fee_recipient: latest.beneficiary(),
prev_randao: B256::random(),
gas_limit: latest.gas_limit(),