Trait BlockDriver

Source
pub trait BlockDriver<Db, Insp = NoOpInspector>
where Db: Database + DatabaseCommit, Insp: Inspector<Ctx<Db>>,
{ type Block: Block; type Error: Error + From<EVMError<Db::Error>>; // Required methods fn block(&self) -> &Self::Block; fn run_txns( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> RunTxResult<Self, Db, Insp>; fn post_block( &mut self, trevm: &EvmNeedsBlock<Db, Insp>, ) -> Result<(), Self::Error>; }
Expand description

Driver for a single trevm block. This trait allows a type to specify the entire lifecycle of a trevm block, from opening the block to driving the trevm to completion.

Required Associated Types§

Source

type Block: Block

The Block filler for this driver.

Source

type Error: Error + From<EVMError<Db::Error>>

An error type for this driver.

Required Methods§

Source

fn block(&self) -> &Self::Block

Get a reference to the block filler for this driver.

Source

fn run_txns( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> RunTxResult<Self, Db, Insp>

Run the transactions for the block.

Source

fn post_block( &mut self, trevm: &EvmNeedsBlock<Db, Insp>, ) -> Result<(), Self::Error>

Run post

Implementors§