Skip to content

Commit 66aca65

Browse files
committed
comments
1 parent 49913d6 commit 66aca65

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,5 @@ pub(crate) fn get_nonce(
293293
}
294294

295295
pub(crate) fn log_exists(logs: &[Log], topic: &B256) -> bool {
296-
for log in logs {
297-
if log.topics().first() == Some(topic) {
298-
return true;
299-
}
300-
}
301-
false
296+
logs.iter().any(|log| log.topics().first() == Some(topic))
302297
}

crates/op-rbuilder/src/builders/flashblocks/builder_tx.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ sol!(
5353
pub(super) enum FlashblockNumberError {
5454
#[error("flashblocks number contract tx reverted: {0:?}")]
5555
Revert(IFlashblockNumber::IFlashblockNumberErrors),
56-
#[error("contract may be invalid, mismatch in log emitted: expected {0:?} but got {1:?}")]
57-
LogMismatch(B256, Option<B256>),
56+
#[error("contract may be invalid, mismatch in log emitted: expected {0:?}")]
57+
LogMismatch(B256),
5858
#[error("unknown revert: {0} err: {1}")]
5959
Unknown(String, Error),
6060
#[error("halt: {0:?}")]
@@ -175,7 +175,6 @@ impl FlashblocksNumberBuilderTx {
175175
Err(BuilderTransactionError::Other(Box::new(
176176
FlashblockNumberError::LogMismatch(
177177
IFlashblockNumber::FlashblockIncremented::SIGNATURE_HASH,
178-
logs.first().and_then(|log| log.topics().first().copied()),
179178
),
180179
)))
181180
}

0 commit comments

Comments
 (0)