Skip to content

Commit fb9ed66

Browse files
committed
comments
1 parent 28d63a7 commit fb9ed66

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

crates/op-rbuilder/src/flashtestations/builder_tx.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ impl FlashtestationsBuilderTx {
245245
revert_reason: None,
246246
logs,
247247
}),
248-
ExecutionResult::Revert { output, .. } => {
248+
ExecutionResult::Revert { output, gas_used} => {
249249
let revert_reason = FlashtestationRegistryError::from(output);
250250
Ok(TxSimulateResult {
251-
gas_used: 0,
251+
gas_used,
252252
success: false,
253253
state_changes: state,
254254
revert_reason: Some(FlashtestationRevertReason::FlashtestationRegistry(
@@ -317,10 +317,10 @@ impl FlashtestationsBuilderTx {
317317
revert_reason: None,
318318
logs,
319319
}),
320-
ExecutionResult::Revert { output, .. } => {
320+
ExecutionResult::Revert { output, gas_used} => {
321321
let revert_reason = BlockBuilderPolicyError::from(output);
322322
Ok(TxSimulateResult {
323-
gas_used: 0,
323+
gas_used,
324324
success: false,
325325
state_changes: state,
326326
revert_reason: Some(FlashtestationRevertReason::BlockBuilderPolicy(

crates/op-rbuilder/src/flashtestations/tx_manager.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::{flashtestations::IFlashtestationRegistry, tx_signer::Signer};
1919
#[derive(Debug, thiserror::Error)]
2020
pub enum TxManagerError {
2121
#[error("rpc error: {0}")]
22-
RpcError(TransportError),
22+
RpcError(#[from] TransportError),
2323
#[error("tx reverted: {0}")]
2424
TxReverted(TxHash),
2525
#[error("error checking tx confirmation: {0}")]
@@ -30,12 +30,6 @@ pub enum TxManagerError {
3030
SignerError(ecdsa::Error),
3131
}
3232

33-
impl From<TransportError> for TxManagerError {
34-
fn from(e: TransportError) -> Self {
35-
TxManagerError::RpcError(e)
36-
}
37-
}
38-
3933
#[derive(Debug, Clone)]
4034
pub struct TxManager {
4135
tee_service_signer: Signer,

0 commit comments

Comments
 (0)