Skip to content

Commit 1d1772e

Browse files
committed
manually impl debug
1 parent 05fac0a commit 1d1772e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/driver/alloy.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::{f32::consts::E, fmt::Debug};
2-
31
use crate::{Block, BundleDriver, DriveBundleResult};
42
use alloy_consensus::TxEnvelope;
53
use alloy_eips::BlockNumberOrTag;
@@ -9,7 +7,7 @@ use alloy_rpc_types_mev::EthCallBundle;
97
use revm::primitives::{EVMError, ExecutionResult};
108
use thiserror::Error;
119

12-
#[derive(Debug, Clone, Error)]
10+
#[derive(Clone, Error)]
1311
enum BundleError<Db: revm::Database> {
1412
#[error("revm block number must match the bundle block number")]
1513
BlockNumberMismatch,
@@ -27,6 +25,17 @@ impl<Db: revm::Database> From<EVMError<Db::Error>> for BundleError<Db> {
2725
}
2826
}
2927

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+
3039
/// A block filler for the bundle, used to fill in the block data specified for the bundle.
3140
#[derive(Clone, Debug)]
3241
struct BundleBlockFiller {

0 commit comments

Comments
 (0)