Skip to content

Commit 0acccab

Browse files
committed
chore: cargo fmt --all
1 parent afd6a39 commit 0acccab

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

bridges/centralized-ethereum/src/actors/dr_reporter.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ impl Handler<DrReporterMsg> for DrReporter {
123123
msg.reports.retain(|report| {
124124
if self.pending_dr_reports.contains(&report.dr_id) {
125125
// Timeout is not over yet, no action is needed
126-
log::debug!("[{}] => ignored as it's currently being reported", report.dr_id);
126+
log::debug!(
127+
"[{}] => ignored as it's currently being reported",
128+
report.dr_id
129+
);
127130

128131
false
129132
} else {
@@ -230,7 +233,8 @@ impl Handler<DrReporterMsg> for DrReporter {
230233

231234
log::info!(
232235
"{:?} will be reported in {} transactions",
233-
dr_ids, batched_reports.len(),
236+
dr_ids,
237+
batched_reports.len(),
234238
);
235239

236240
for (batched_report, eth_gas_limit) in batched_reports {
@@ -314,8 +318,9 @@ impl Handler<DrReporterMsg> for DrReporter {
314318
Err(elapsed) => {
315319
// Timeout is over
316320
log::warn!(
317-
"Timeout ({} secs) when calling reportResultBatch{:?}",
318-
elapsed, &batched_report
321+
"Timeout ({} secs) when calling reportResultBatch{:?}",
322+
elapsed,
323+
&batched_report
319324
);
320325
}
321326
}
@@ -428,7 +433,6 @@ async fn split_by_gas_limit(
428433
// Skip this single-query batch if still not possible to estimate gas
429434
log::error!("Cannot estimate gas limit: {:?}", e);
430435
log::warn!("Skipping report batch: {:?}", batch_params);
431-
432436
} else {
433437
// Split batch in half if gas estimation is not possible
434438
let (batch_tuples_1, batch_tuples_2) =
@@ -495,8 +499,12 @@ async fn split_by_gas_limit(
495499
log::debug!(
496500
"reportResultBatch (x{} drs) estimated profit: {} - {} ETH",
497501
batch_params.len(),
498-
Unit::Wei(&revenues.to_string()).to_eth_str().unwrap_or_default(),
499-
Unit::Wei(&expenses.to_string()).to_eth_str().unwrap_or_default(),
502+
Unit::Wei(&revenues.to_string())
503+
.to_eth_str()
504+
.unwrap_or_default(),
505+
Unit::Wei(&expenses.to_string())
506+
.to_eth_str()
507+
.unwrap_or_default(),
500508
);
501509
v.push((batch_params, estimated_gas));
502510
continue;

bridges/centralized-ethereum/src/actors/eth_poller.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ impl EthPoller {
7575
}
7676

7777
fn check_new_requests_from_ethereum(&self, ctx: &mut Context<Self>, period: Duration) {
78-
7978
let wrb_contract = self.wrb_contract.clone().unwrap();
8079
let skip_first = U256::from(self.skip_first);
8180
let max_batch_size = self.max_batch_size;

bridges/centralized-ethereum/src/actors/wit_poller.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,7 @@ impl WitPoller {
103103
current_commit_round: dr_commits_round,
104104
..
105105
})) => {
106-
log::info!(
107-
"[{}] <= dr_tx = {}",
108-
dr_id,
109-
dr_tx_hash
110-
);
106+
log::info!("[{}] <= dr_tx = {}", dr_id, dr_tx_hash);
111107

112108
let result = tally.tally.clone();
113109
// Get timestamp of the epoch at which all data request commit txs
@@ -144,11 +140,7 @@ impl WitPoller {
144140
}
145141
};
146142
} else {
147-
log::debug!(
148-
"[{}] <> dr_tx = {}",
149-
dr_id,
150-
dr_tx_hash
151-
);
143+
log::debug!("[{}] <> dr_tx = {}", dr_id, dr_tx_hash);
152144
}
153145

154146
let elapsed_secs = current_timestamp - dr_tx_creation_timestamp;

0 commit comments

Comments
 (0)