reth::api

Trait EngineValidator

pub trait EngineValidator<Types>:
    Clone
    + Send
    + Sync
    + Unpin
    + 'static
where Types: EngineTypes,
{ // Required methods fn validate_version_specific_fields( &self, version: EngineApiMessageVersion, payload_or_attrs: PayloadOrAttributes<'_, <Types as PayloadTypes>::PayloadAttributes>, ) -> Result<(), EngineObjectValidationError>; fn ensure_well_formed_attributes( &self, version: EngineApiMessageVersion, attributes: &<Types as PayloadTypes>::PayloadAttributes, ) -> Result<(), EngineObjectValidationError>; }
Expand description

Type that validates the payloads sent to the engine.

Required Methods§

fn validate_version_specific_fields( &self, version: EngineApiMessageVersion, payload_or_attrs: PayloadOrAttributes<'_, <Types as PayloadTypes>::PayloadAttributes>, ) -> Result<(), EngineObjectValidationError>

Validates the presence or exclusion of fork-specific fields based on the payload attributes and the message version.

fn ensure_well_formed_attributes( &self, version: EngineApiMessageVersion, attributes: &<Types as PayloadTypes>::PayloadAttributes, ) -> Result<(), EngineObjectValidationError>

Ensures that the payload attributes are valid for the given EngineApiMessageVersion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<Types> EngineValidator<Types> for EthereumEngineValidator
where Types: EngineTypes<PayloadAttributes = PayloadAttributes>,

Implementors§