Skip to content

Commit 8ae4e77

Browse files
Update aggregation_mode/src/backend/mod.rs
Co-authored-by: Marcos Nicolau <[email protected]>
1 parent 2da166b commit 8ae4e77

File tree

1 file changed

+3
-6
lines changed
  • aggregation_mode/src/backend

1 file changed

+3
-6
lines changed

aggregation_mode/src/backend/mod.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,9 @@ impl ProofAggregator {
157157
// We add 24 hours because the proof aggregator runs once a day, so the time elapsed
158158
// should be considered over a 24h period.
159159

160-
let gas_price = match self.rpc_provider.get_gas_price().await {
161-
Ok(price) => Ok(U256::from(price)),
162-
Err(e1) => Err(AggregatedProofSubmissionError::GasPriceError(
163-
e1.to_string(),
164-
)),
165-
}?;
160+
let gas_price = match self.rpc_provider.get_gas_price().await.map_err(|e| AggregatedProofSubmissionError::GasPriceError(
161+
e.to_string(),
162+
))?;
166163

167164
if self.should_send_proof_to_verify_on_chain(
168165
time_elapsed,

0 commit comments

Comments
 (0)