11use crate :: {
2+ helpers:: Ctx ,
23 system:: { MAX_BLOB_GAS_PER_BLOCK_CANCUN , MAX_BLOB_GAS_PER_BLOCK_PRAGUE } ,
34 trevm_bail, trevm_ensure, trevm_try, Block , BundleDriver , DriveBundleResult ,
45} ;
@@ -14,7 +15,7 @@ use alloy::{
1415use revm:: {
1516 context:: result:: { EVMError , ExecutionResult } ,
1617 primitives:: hardfork:: SpecId ,
17- Database , DatabaseCommit ,
18+ Database , DatabaseCommit , Inspector ,
1819} ;
1920
2021/// Possible errors that can occur while driving a bundle.
@@ -258,10 +259,14 @@ impl BundleProcessor<EthCallBundle, EthCallBundleResponse> {
258259impl < Insp > BundleDriver < Insp > for BundleProcessor < EthCallBundle , EthCallBundleResponse > {
259260 type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
260261
261- fn run_bundle < Db : Database + DatabaseCommit > (
262+ fn run_bundle < Db > (
262263 & mut self ,
263264 trevm : crate :: EvmNeedsTx < Db , Insp > ,
264- ) -> DriveBundleResult < Db , Insp , Self > {
265+ ) -> DriveBundleResult < Db , Insp , Self >
266+ where
267+ Db : Database + DatabaseCommit ,
268+ Insp : Inspector < Ctx < Db > > ,
269+ {
265270 // Check if the block we're in is valid for this bundle. Both must match
266271 trevm_ensure ! (
267272 trevm. inner( ) . block. number == self . bundle. block_number,
@@ -383,21 +388,29 @@ impl<Insp> BundleDriver<Insp> for BundleProcessor<EthCallBundle, EthCallBundleRe
383388 }
384389 }
385390
386- fn post_bundle < Db : Database + DatabaseCommit > (
391+ fn post_bundle < Db > (
387392 & mut self ,
388393 _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
389- ) -> Result < ( ) , Self :: Error < Db > > {
394+ ) -> Result < ( ) , Self :: Error < Db > >
395+ where
396+ Db : Database + DatabaseCommit ,
397+ Insp : Inspector < Ctx < Db > > ,
398+ {
390399 Ok ( ( ) )
391400 }
392401}
393402
394403impl < Insp > BundleDriver < Insp > for BundleProcessor < EthSendBundle , EthBundleHash > {
395404 type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
396405
397- fn run_bundle < Db : Database + DatabaseCommit > (
406+ fn run_bundle < Db > (
398407 & mut self ,
399408 trevm : crate :: EvmNeedsTx < Db , Insp > ,
400- ) -> DriveBundleResult < Db , Insp , Self > {
409+ ) -> DriveBundleResult < Db , Insp , Self >
410+ where
411+ Db : Database + DatabaseCommit ,
412+ Insp : Inspector < Ctx < Db > > ,
413+ {
401414 {
402415 // Check if the block we're in is valid for this bundle. Both must match
403416 trevm_ensure ! (
@@ -470,10 +483,14 @@ impl<Insp> BundleDriver<Insp> for BundleProcessor<EthSendBundle, EthBundleHash>
470483 }
471484 }
472485
473- fn post_bundle < Db : Database + DatabaseCommit > (
486+ fn post_bundle < Db > (
474487 & mut self ,
475488 _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
476- ) -> Result < ( ) , Self :: Error < Db > > {
489+ ) -> Result < ( ) , Self :: Error < Db > >
490+ where
491+ Db : Database + DatabaseCommit ,
492+ Insp : Inspector < Ctx < Db > > ,
493+ {
477494 Ok ( ( ) )
478495 }
479496}
@@ -537,10 +554,14 @@ impl From<EthCallBundle> for BundleBlockFiller {
537554impl < Insp > BundleDriver < Insp > for EthCallBundle {
538555 type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
539556
540- fn run_bundle < Db : Database + DatabaseCommit > (
557+ fn run_bundle < Db > (
541558 & mut self ,
542559 trevm : crate :: EvmNeedsTx < Db , Insp > ,
543- ) -> DriveBundleResult < Db , Insp , Self > {
560+ ) -> DriveBundleResult < Db , Insp , Self >
561+ where
562+ Db : Database + DatabaseCommit ,
563+ Insp : Inspector < Ctx < Db > > ,
564+ {
544565 // Check if the block we're in is valid for this bundle. Both must match
545566 trevm_ensure ! (
546567 trevm. inner( ) . block. number == self . block_number,
@@ -613,10 +634,14 @@ impl<Insp> BundleDriver<Insp> for EthCallBundle {
613634 }
614635 }
615636
616- fn post_bundle < Db : Database + DatabaseCommit > (
637+ fn post_bundle < Db > (
617638 & mut self ,
618639 _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
619- ) -> Result < ( ) , Self :: Error < Db > > {
640+ ) -> Result < ( ) , Self :: Error < Db > >
641+ where
642+ Db : Database + DatabaseCommit ,
643+ Insp : Inspector < Ctx < Db > > ,
644+ {
620645 Ok ( ( ) )
621646 }
622647}
@@ -633,6 +658,7 @@ impl<Insp> BundleDriver<Insp> for EthSendBundle {
633658 ) -> DriveBundleResult < Db , Insp , Self >
634659 where
635660 Db : Database + DatabaseCommit ,
661+ Insp : Inspector < Ctx < Db > > ,
636662 {
637663 // Check if the block we're in is valid for this bundle. Both must match
638664 trevm_ensure ! (
@@ -721,10 +747,14 @@ impl<Insp> BundleDriver<Insp> for EthSendBundle {
721747 Ok ( t)
722748 }
723749
724- fn post_bundle < Db : Database + DatabaseCommit > (
750+ fn post_bundle < Db > (
725751 & mut self ,
726752 _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
727- ) -> Result < ( ) , Self :: Error < Db > > {
753+ ) -> Result < ( ) , Self :: Error < Db > >
754+ where
755+ Db : Database + DatabaseCommit ,
756+ Insp : Inspector < Ctx < Db > > ,
757+ {
728758 Ok ( ( ) )
729759 }
730760}
0 commit comments