pub trait BlockDriver<Db, Insp = NoOpInspector>{
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§
Required Methods§
Sourcefn run_txns(
&mut self,
trevm: EvmNeedsTx<Db, Insp>,
) -> RunTxResult<Self, Db, Insp>
fn run_txns( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> RunTxResult<Self, Db, Insp>
Run the transactions for the block.
Sourcefn post_block(
&mut self,
trevm: &EvmNeedsBlock<Db, Insp>,
) -> Result<(), Self::Error>
fn post_block( &mut self, trevm: &EvmNeedsBlock<Db, Insp>, ) -> Result<(), Self::Error>
Run post