Skip to content

Commit 51ce787

Browse files
committed
cargo fmt
1 parent 938903b commit 51ce787

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

crates/batcher/src/lib.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,12 @@ impl Batcher {
520520

521521
async fn process_balance_unlocked_events(&self) -> Result<(), BatcherError> {
522522
// Get current block number using HTTP providers
523-
let current_block = self.get_current_block_number().await
524-
.map_err(|e| BatcherError::EthereumProviderError(format!("Failed to get current block number: {:?}", e)))?;
523+
let current_block = self.get_current_block_number().await.map_err(|e| {
524+
BatcherError::EthereumProviderError(format!(
525+
"Failed to get current block number: {:?}",
526+
e
527+
))
528+
})?;
525529

526530
// Calculate the block range based on polling interval
527531
// Formula: interval / 12 * 2 (assuming 12-second block times, look back 2x the interval)
@@ -532,7 +536,12 @@ impl Batcher {
532536
let events = self
533537
.query_balance_unlocked_events(from_block, current_block)
534538
.await
535-
.map_err(|e| BatcherError::EthereumProviderError(format!("Failed to query BalanceUnlocked events: {:?}", e)))?;
539+
.map_err(|e| {
540+
BatcherError::EthereumProviderError(format!(
541+
"Failed to query BalanceUnlocked events: {:?}",
542+
e
543+
))
544+
})?;
536545

537546
info!(
538547
"Found {} BalanceUnlocked events in blocks {} to {}",

0 commit comments

Comments
 (0)