reth_engine_util

Trait EngineMessageStreamExt

Source
pub trait EngineMessageStreamExt<Engine: EngineTypes>: Stream<Item = BeaconEngineMessage<Engine>> {
    // Provided methods
    fn skip_fcu(self, count: usize) -> EngineSkipFcu<Self>
       where Self: Sized { ... }
    fn maybe_skip_fcu(
        self,
        maybe_count: Option<usize>,
    ) -> Either<EngineSkipFcu<Self>, Self>
       where Self: Sized { ... }
    fn skip_new_payload(self, count: usize) -> EngineSkipNewPayload<Self>
       where Self: Sized { ... }
    fn maybe_skip_new_payload(
        self,
        maybe_count: Option<usize>,
    ) -> Either<EngineSkipNewPayload<Self>, Self>
       where Self: Sized { ... }
    fn store_messages(self, path: PathBuf) -> EngineStoreStream<Self>
       where Self: Sized { ... }
    fn maybe_store_messages(
        self,
        maybe_path: Option<PathBuf>,
    ) -> Either<EngineStoreStream<Self>, Self>
       where Self: Sized { ... }
    fn reorg<Provider, Evm, Spec>(
        self,
        provider: Provider,
        evm_config: Evm,
        payload_validator: ExecutionPayloadValidator<Spec>,
        frequency: usize,
        depth: Option<usize>,
    ) -> EngineReorg<Self, Engine, Provider, Evm, Spec>
       where Self: Sized { ... }
    fn maybe_reorg<Provider, Evm, Spec>(
        self,
        provider: Provider,
        evm_config: Evm,
        payload_validator: ExecutionPayloadValidator<Spec>,
        frequency: Option<usize>,
        depth: Option<usize>,
    ) -> Either<EngineReorg<Self, Engine, Provider, Evm, Spec>, Self>
       where Self: Sized { ... }
}
Expand description

The collection of stream extensions for engine API message stream.

Provided Methods§

Source

fn skip_fcu(self, count: usize) -> EngineSkipFcu<Self>
where Self: Sized,

Skips the specified number of [BeaconEngineMessage::ForkchoiceUpdated] messages from the engine message stream.

Source

fn maybe_skip_fcu( self, maybe_count: Option<usize>, ) -> Either<EngineSkipFcu<Self>, Self>
where Self: Sized,

If the count is Some, returns the stream that skips the specified number of [BeaconEngineMessage::ForkchoiceUpdated] messages. Otherwise, returns Self.

Source

fn skip_new_payload(self, count: usize) -> EngineSkipNewPayload<Self>
where Self: Sized,

Skips the specified number of [BeaconEngineMessage::NewPayload] messages from the engine message stream.

Source

fn maybe_skip_new_payload( self, maybe_count: Option<usize>, ) -> Either<EngineSkipNewPayload<Self>, Self>
where Self: Sized,

If the count is Some, returns the stream that skips the specified number of [BeaconEngineMessage::NewPayload] messages. Otherwise, returns Self.

Source

fn store_messages(self, path: PathBuf) -> EngineStoreStream<Self>
where Self: Sized,

Stores engine messages at the specified location.

Source

fn maybe_store_messages( self, maybe_path: Option<PathBuf>, ) -> Either<EngineStoreStream<Self>, Self>
where Self: Sized,

If the path is Some, returns the stream that stores engine messages at the specified location. Otherwise, returns Self.

Source

fn reorg<Provider, Evm, Spec>( self, provider: Provider, evm_config: Evm, payload_validator: ExecutionPayloadValidator<Spec>, frequency: usize, depth: Option<usize>, ) -> EngineReorg<Self, Engine, Provider, Evm, Spec>
where Self: Sized,

Creates reorgs with specified frequency.

Source

fn maybe_reorg<Provider, Evm, Spec>( self, provider: Provider, evm_config: Evm, payload_validator: ExecutionPayloadValidator<Spec>, frequency: Option<usize>, depth: Option<usize>, ) -> Either<EngineReorg<Self, Engine, Provider, Evm, Spec>, Self>
where Self: Sized,

If frequency is Some, returns the stream that creates reorgs with specified frequency. Otherwise, returns Self.

Implementors§

Source§

impl<Engine, T> EngineMessageStreamExt<Engine> for T
where Engine: EngineTypes, T: Stream<Item = BeaconEngineMessage<Engine>>,