@@ -256,17 +256,17 @@ impl BundleProcessor<EthCallBundle, EthCallBundleResponse> {
256256 }
257257}
258258
259- impl < Insp > BundleDriver < Insp > for BundleProcessor < EthCallBundle , EthCallBundleResponse > {
260- type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
259+ impl < Db , Insp > BundleDriver < Db , Insp > for BundleProcessor < EthCallBundle , EthCallBundleResponse >
260+ where
261+ Db : Database + DatabaseCommit ,
262+ Insp : Inspector < Ctx < Db > > ,
263+ {
264+ type Error = BundleError < Db > ;
261265
262- fn run_bundle < Db > (
266+ fn run_bundle (
263267 & mut self ,
264268 trevm : crate :: EvmNeedsTx < Db , Insp > ,
265- ) -> DriveBundleResult < Db , Insp , Self >
266- where
267- Db : Database + DatabaseCommit ,
268- Insp : Inspector < Ctx < Db > > ,
269- {
269+ ) -> DriveBundleResult < Db , Insp , Self > {
270270 // Check if the block we're in is valid for this bundle. Both must match
271271 trevm_ensure ! (
272272 trevm. inner( ) . block. number == self . bundle. block_number,
@@ -388,29 +388,22 @@ impl<Insp> BundleDriver<Insp> for BundleProcessor<EthCallBundle, EthCallBundleRe
388388 }
389389 }
390390
391- fn post_bundle < Db > (
392- & mut self ,
393- _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
394- ) -> Result < ( ) , Self :: Error < Db > >
395- where
396- Db : Database + DatabaseCommit ,
397- Insp : Inspector < Ctx < Db > > ,
398- {
391+ fn post_bundle ( & mut self , _trevm : & crate :: EvmNeedsTx < Db , Insp > ) -> Result < ( ) , Self :: Error > {
399392 Ok ( ( ) )
400393 }
401394}
402395
403- impl < Insp > BundleDriver < Insp > for BundleProcessor < EthSendBundle , EthBundleHash > {
404- type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
396+ impl < Db , Insp > BundleDriver < Db , Insp > for BundleProcessor < EthSendBundle , EthBundleHash >
397+ where
398+ Db : Database + DatabaseCommit ,
399+ Insp : Inspector < Ctx < Db > > ,
400+ {
401+ type Error = BundleError < Db > ;
405402
406- fn run_bundle < Db > (
403+ fn run_bundle (
407404 & mut self ,
408405 trevm : crate :: EvmNeedsTx < Db , Insp > ,
409- ) -> DriveBundleResult < Db , Insp , Self >
410- where
411- Db : Database + DatabaseCommit ,
412- Insp : Inspector < Ctx < Db > > ,
413- {
406+ ) -> DriveBundleResult < Db , Insp , Self > {
414407 {
415408 // Check if the block we're in is valid for this bundle. Both must match
416409 trevm_ensure ! (
@@ -483,14 +476,7 @@ impl<Insp> BundleDriver<Insp> for BundleProcessor<EthSendBundle, EthBundleHash>
483476 }
484477 }
485478
486- fn post_bundle < Db > (
487- & mut self ,
488- _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
489- ) -> Result < ( ) , Self :: Error < Db > >
490- where
491- Db : Database + DatabaseCommit ,
492- Insp : Inspector < Ctx < Db > > ,
493- {
479+ fn post_bundle ( & mut self , _trevm : & crate :: EvmNeedsTx < Db , Insp > ) -> Result < ( ) , Self :: Error > {
494480 Ok ( ( ) )
495481 }
496482}
@@ -551,17 +537,17 @@ impl From<EthCallBundle> for BundleBlockFiller {
551537 }
552538}
553539
554- impl < Insp > BundleDriver < Insp > for EthCallBundle {
555- type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
540+ impl < Db , Insp > BundleDriver < Db , Insp > for EthCallBundle
541+ where
542+ Db : Database + DatabaseCommit ,
543+ Insp : Inspector < Ctx < Db > > ,
544+ {
545+ type Error = BundleError < Db > ;
556546
557- fn run_bundle < Db > (
547+ fn run_bundle (
558548 & mut self ,
559549 trevm : crate :: EvmNeedsTx < Db , Insp > ,
560- ) -> DriveBundleResult < Db , Insp , Self >
561- where
562- Db : Database + DatabaseCommit ,
563- Insp : Inspector < Ctx < Db > > ,
564- {
550+ ) -> DriveBundleResult < Db , Insp , Self > {
565551 // Check if the block we're in is valid for this bundle. Both must match
566552 trevm_ensure ! (
567553 trevm. inner( ) . block. number == self . block_number,
@@ -634,32 +620,25 @@ impl<Insp> BundleDriver<Insp> for EthCallBundle {
634620 }
635621 }
636622
637- fn post_bundle < Db > (
638- & mut self ,
639- _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
640- ) -> Result < ( ) , Self :: Error < Db > >
641- where
642- Db : Database + DatabaseCommit ,
643- Insp : Inspector < Ctx < Db > > ,
644- {
623+ fn post_bundle ( & mut self , _trevm : & crate :: EvmNeedsTx < Db , Insp > ) -> Result < ( ) , Self :: Error > {
645624 Ok ( ( ) )
646625 }
647626}
648627
649628/// An implementation of [BundleDriver] for [EthSendBundle].
650629/// This allows us to drive a bundle of transactions and accumulate the resulting state in the EVM.
651630/// Allows to simply take an [EthSendBundle] and get the resulting EVM state.
652- impl < Insp > BundleDriver < Insp > for EthSendBundle {
653- type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
631+ impl < Db , Insp > BundleDriver < Db , Insp > for EthSendBundle
632+ where
633+ Db : Database + DatabaseCommit ,
634+ Insp : Inspector < Ctx < Db > > ,
635+ {
636+ type Error = BundleError < Db > ;
654637
655- fn run_bundle < Db > (
638+ fn run_bundle (
656639 & mut self ,
657640 trevm : crate :: EvmNeedsTx < Db , Insp > ,
658- ) -> DriveBundleResult < Db , Insp , Self >
659- where
660- Db : Database + DatabaseCommit ,
661- Insp : Inspector < Ctx < Db > > ,
662- {
641+ ) -> DriveBundleResult < Db , Insp , Self > {
663642 // Check if the block we're in is valid for this bundle. Both must match
664643 trevm_ensure ! (
665644 trevm. inner( ) . block. number == self . block_number,
@@ -747,14 +726,7 @@ impl<Insp> BundleDriver<Insp> for EthSendBundle {
747726 Ok ( t)
748727 }
749728
750- fn post_bundle < Db > (
751- & mut self ,
752- _trevm : & crate :: EvmNeedsTx < Db , Insp > ,
753- ) -> Result < ( ) , Self :: Error < Db > >
754- where
755- Db : Database + DatabaseCommit ,
756- Insp : Inspector < Ctx < Db > > ,
757- {
729+ fn post_bundle ( & mut self , _trevm : & crate :: EvmNeedsTx < Db , Insp > ) -> Result < ( ) , Self :: Error > {
758730 Ok ( ( ) )
759731 }
760732}
0 commit comments