1
- use std:: { f32:: consts:: E , fmt:: Debug } ;
2
-
3
1
use crate :: { Block , BundleDriver , DriveBundleResult } ;
4
2
use alloy_consensus:: TxEnvelope ;
5
3
use alloy_eips:: BlockNumberOrTag ;
@@ -9,7 +7,7 @@ use alloy_rpc_types_mev::EthCallBundle;
9
7
use revm:: primitives:: { EVMError , ExecutionResult } ;
10
8
use thiserror:: Error ;
11
9
12
- #[ derive( Debug , Clone , Error ) ]
10
+ #[ derive( Clone , Error ) ]
13
11
enum BundleError < Db : revm:: Database > {
14
12
#[ error( "revm block number must match the bundle block number" ) ]
15
13
BlockNumberMismatch ,
@@ -27,6 +25,17 @@ impl<Db: revm::Database> From<EVMError<Db::Error>> for BundleError<Db> {
27
25
}
28
26
}
29
27
28
+ impl < Db : revm:: Database > std:: fmt:: Debug for BundleError < Db > {
29
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
30
+ match self {
31
+ Self :: BlockNumberMismatch => write ! ( f, "BlockNumberMismatch" ) ,
32
+ Self :: BundleReverted => write ! ( f, "BundleReverted" ) ,
33
+ Self :: TransactionDecodingError ( e) => write ! ( f, "TransactionDecodingError({:?})" , e) ,
34
+ Self :: EVMError { .. } => write ! ( f, "EVMError" ) ,
35
+ }
36
+ }
37
+ }
38
+
30
39
/// A block filler for the bundle, used to fill in the block data specified for the bundle.
31
40
#[ derive( Clone , Debug ) ]
32
41
struct BundleBlockFiller {
0 commit comments