Skip to content

Commit

Permalink
rework comment
Browse files Browse the repository at this point in the history
  • Loading branch information
m-lord-renkse committed Jan 2, 2025
1 parent 3e452c3 commit 176aecd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
13 changes: 2 additions & 11 deletions crates/driver/src/domain/mempools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Mempools {
TxStatus::Reverted => {
return Err(Error::Revert {
tx_id: hash.clone(),
block_no: Some(block.number),
block_number: block.number,
})
}
TxStatus::Pending => {
Expand Down Expand Up @@ -243,7 +243,7 @@ pub enum Error {
#[error("Mined reverted transaction: {tx_id:?}")]
Revert {
tx_id: eth::TxId,
block_no: Option<BlockNo>,
block_number: BlockNo,
},
#[error("Simulation started reverting during submission")]
SimulationRevert(Option<BlockNo>),
Expand All @@ -254,12 +254,3 @@ pub enum Error {
#[error("Failed to submit: {0:?}")]
Other(#[from] anyhow::Error),
}

impl Error {
pub fn block_no(&self) -> Option<BlockNo> {
match &self {
Error::Revert { block_no, .. } | Error::SimulationRevert(block_no) => *block_no,
_ => None,
}
}
}
1 change: 0 additions & 1 deletion crates/driver/src/infra/observe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ pub fn mempool_executed(
?err,
%mempool,
?settlement,
block_no=err.block_no(),
"sending transaction via mempool failed",
);
}
Expand Down

0 comments on commit 176aecd

Please sign in to comment.