Skip to content

Commit 027b68b

Browse files
committed
manually impl debug
1 parent 05fac0a commit 027b68b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/driver/alloy.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use alloy_rpc_types_mev::EthCallBundle;
99
use revm::primitives::{EVMError, ExecutionResult};
1010
use thiserror::Error;
1111

12-
#[derive(Debug, Clone, Error)]
12+
#[derive(Clone, Error)]
1313
enum BundleError<Db: revm::Database> {
1414
#[error("revm block number must match the bundle block number")]
1515
BlockNumberMismatch,
@@ -27,6 +27,17 @@ impl<Db: revm::Database> From<EVMError<Db::Error>> for BundleError<Db> {
2727
}
2828
}
2929

30+
impl<Db: revm::Database> std::fmt::Debug for BundleError<Db> {
31+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32+
match self {
33+
Self::BlockNumberMismatch => write!(f, "BlockNumberMismatch"),
34+
Self::BundleReverted => write!(f, "BundleReverted"),
35+
Self::TransactionDecodingError(e) => write!(f, "TransactionDecodingError({:?})", e),
36+
Self::EVMError { .. } => write!(f, "EVMError"),
37+
}
38+
}
39+
}
40+
3041
/// A block filler for the bundle, used to fill in the block data specified for the bundle.
3142
#[derive(Clone, Debug)]
3243
struct BundleBlockFiller {

0 commit comments

Comments
 (0)