Skip to content

Commit 007d2c5

Browse files
Rename the gas_price_in_wei var ti avoid metion it's in wei
1 parent 7260821 commit 007d2c5

File tree

1 file changed

+2
-2
lines changed
  • aggregation_mode/src/backend

1 file changed

+2
-2
lines changed

aggregation_mode/src/backend/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ impl ProofAggregator {
204204
&self,
205205
time_elapsed: Duration,
206206
monthly_eth_budget: f64,
207-
gas_price_in_wei: U256,
207+
network_gas_price: U256,
208208
) -> bool {
209209
// We assume a fixed gas cost of 300,000 for each of the 2 transactions
210210
const ON_CHAIN_COST_IN_GAS_UNITS: u64 = 600_000u64;
211211

212212
let on_chain_cost_in_gas: U256 = U256::from(ON_CHAIN_COST_IN_GAS_UNITS);
213213
let max_to_spend_in_wei = Self::max_to_spend_in_wei(time_elapsed, monthly_eth_budget);
214214

215-
let expected_cost_in_wei = gas_price_in_wei * on_chain_cost_in_gas;
215+
let expected_cost_in_wei = network_gas_price * on_chain_cost_in_gas;
216216

217217
expected_cost_in_wei <= max_to_spend_in_wei
218218
}

0 commit comments

Comments
 (0)