Function reth_payload_primitives::validate_payload_timestamp
source ยท pub fn validate_payload_timestamp(
chain_spec: &ChainSpec,
version: EngineApiMessageVersion,
timestamp: u64,
) -> Result<(), EngineObjectValidationError>
Expand description
Validates the timestamp depending on the version called:
- If V2, this ensures that the payload timestamp is pre-Cancun.
- If V3, this ensures that the payload timestamp is within the Cancun timestamp.
- If V4, this ensures that the payload timestamp is within the Prague timestamp.
Otherwise, this will return EngineObjectValidationError::UnsupportedFork
.