1
1
use crate :: {
2
+ helpers:: Ctx ,
2
3
system:: { MAX_BLOB_GAS_PER_BLOCK_CANCUN , MAX_BLOB_GAS_PER_BLOCK_PRAGUE } ,
3
4
trevm_bail, trevm_ensure, trevm_try, Block , BundleDriver , DriveBundleResult ,
4
5
} ;
@@ -14,7 +15,7 @@ use alloy::{
14
15
use revm:: {
15
16
context:: result:: { EVMError , ExecutionResult } ,
16
17
primitives:: hardfork:: SpecId ,
17
- Database , DatabaseCommit ,
18
+ Database , DatabaseCommit , Inspector ,
18
19
} ;
19
20
20
21
/// Possible errors that can occur while driving a bundle.
@@ -258,10 +259,14 @@ impl BundleProcessor<EthCallBundle, EthCallBundleResponse> {
258
259
impl < Insp > BundleDriver < Insp > for BundleProcessor < EthCallBundle , EthCallBundleResponse > {
259
260
type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
260
261
261
- fn run_bundle < Db : Database + DatabaseCommit > (
262
+ fn run_bundle < Db > (
262
263
& mut self ,
263
264
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
+ {
265
270
// Check if the block we're in is valid for this bundle. Both must match
266
271
trevm_ensure ! (
267
272
trevm. inner( ) . block. number == self . bundle. block_number,
@@ -383,21 +388,29 @@ impl<Insp> BundleDriver<Insp> for BundleProcessor<EthCallBundle, EthCallBundleRe
383
388
}
384
389
}
385
390
386
- fn post_bundle < Db : Database + DatabaseCommit > (
391
+ fn post_bundle < Db > (
387
392
& mut self ,
388
393
_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
+ {
390
399
Ok ( ( ) )
391
400
}
392
401
}
393
402
394
403
impl < Insp > BundleDriver < Insp > for BundleProcessor < EthSendBundle , EthBundleHash > {
395
404
type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
396
405
397
- fn run_bundle < Db : Database + DatabaseCommit > (
406
+ fn run_bundle < Db > (
398
407
& mut self ,
399
408
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
+ {
401
414
{
402
415
// Check if the block we're in is valid for this bundle. Both must match
403
416
trevm_ensure ! (
@@ -470,10 +483,14 @@ impl<Insp> BundleDriver<Insp> for BundleProcessor<EthSendBundle, EthBundleHash>
470
483
}
471
484
}
472
485
473
- fn post_bundle < Db : Database + DatabaseCommit > (
486
+ fn post_bundle < Db > (
474
487
& mut self ,
475
488
_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
+ {
477
494
Ok ( ( ) )
478
495
}
479
496
}
@@ -537,10 +554,14 @@ impl From<EthCallBundle> for BundleBlockFiller {
537
554
impl < Insp > BundleDriver < Insp > for EthCallBundle {
538
555
type Error < Db : Database + DatabaseCommit > = BundleError < Db > ;
539
556
540
- fn run_bundle < Db : Database + DatabaseCommit > (
557
+ fn run_bundle < Db > (
541
558
& mut self ,
542
559
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
+ {
544
565
// Check if the block we're in is valid for this bundle. Both must match
545
566
trevm_ensure ! (
546
567
trevm. inner( ) . block. number == self . block_number,
@@ -613,10 +634,14 @@ impl<Insp> BundleDriver<Insp> for EthCallBundle {
613
634
}
614
635
}
615
636
616
- fn post_bundle < Db : Database + DatabaseCommit > (
637
+ fn post_bundle < Db > (
617
638
& mut self ,
618
639
_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
+ {
620
645
Ok ( ( ) )
621
646
}
622
647
}
@@ -633,6 +658,7 @@ impl<Insp> BundleDriver<Insp> for EthSendBundle {
633
658
) -> DriveBundleResult < Db , Insp , Self >
634
659
where
635
660
Db : Database + DatabaseCommit ,
661
+ Insp : Inspector < Ctx < Db > > ,
636
662
{
637
663
// Check if the block we're in is valid for this bundle. Both must match
638
664
trevm_ensure ! (
@@ -721,10 +747,14 @@ impl<Insp> BundleDriver<Insp> for EthSendBundle {
721
747
Ok ( t)
722
748
}
723
749
724
- fn post_bundle < Db : Database + DatabaseCommit > (
750
+ fn post_bundle < Db > (
725
751
& mut self ,
726
752
_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
+ {
728
758
Ok ( ( ) )
729
759
}
730
760
}
0 commit comments