Skip to main content

validate_target_gas_limit_presence

Function validate_target_gas_limit_presence 

Source
pub fn validate_target_gas_limit_presence(
    version: EngineApiMessageVersion,
    message_validation_kind: MessageValidationKind,
    has_target_gas_limit: bool,
) -> Result<(), EngineObjectValidationError>
Expand description

Validates the presence of the target gas limit field in payload attributes.

The attributes of engine_forkchoiceUpdatedV4 and engine_forkchoiceUpdatedV5 include the field, so it must be Some for them. A missing field is a structural error and fails with -38003: Invalid payload attributes.