Skip to main content

validate_slot_number_presence

Function validate_slot_number_presence 

Source
pub fn validate_slot_number_presence(
    version: EngineApiMessageVersion,
    message_validation_kind: MessageValidationKind,
    has_slot_number: bool,
) -> Result<(), EngineObjectValidationError>
Available on crate feature node-api only.
Expand description

Validates the presence of the slot number field for the engine method version.

engine_newPayloadV5, engine_newPayloadV6, engine_forkchoiceUpdatedV4 and engine_forkchoiceUpdatedV5 carry the field, so it must be Some for them; every other method must leave it None. Presence does not depend on the payload timestamp, so a well-formed request outside the method’s fork reaches the fork check in validate_payload_timestamp and fails with -38005: Unsupported fork.