File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
aggregation_mode/proof_aggregator/src/backend Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -474,18 +474,17 @@ mod tests {
474474 // The should_send_proof_to_verify_on_chain function returns true when:
475475 // gas_price * 600_000 <= (seconds_elapsed) * (monthly_eth_budget / (30 * 24 * 60 * 60))
476476
477+ const BUDGET_PER_MONTH_IN_ETH : f64 = 0.15 ;
478+ const ONE_DAY_SECONDS : u64 = 24 * 60 * 60 ;
479+ let gas_price = U256 :: from ( 1_000_000_000u64 ) ; // 10 GWEI
480+
477481 // Case 1: Base case -> should return true
478482 // Monthly Budget: 0.15 ETH -> 0.005 ETH per day -> 0.000000058 ETH per hour
479483 // Elapsed Time: 24 hours
480484 // Gas Price: 1 Gwei
481485 // Max to spend: 0.000000058 ETH/hour * 24 hours = 0.005 ETH
482486 // Expected cost: 600,000 * 1 Gwei = 0.0006 ETH
483487 // Expected cost < Max to spend, so we can send the proof
484-
485- const BUDGET_PER_MONTH_IN_ETH : f64 = 0.15 ;
486- const ONE_DAY_SECONDS : u64 = 24 * 60 * 60 ;
487- let gas_price = U256 :: from ( 1_000_000_000u64 ) ; // 10 GWEI
488-
489488 assert ! ( aggregator. should_send_proof_to_verify_on_chain(
490489 Duration :: from_secs( ONE_DAY_SECONDS ) , // 24 hours
491490 BUDGET_PER_MONTH_IN_ETH , // 0.15 ETH monthly budget
You can’t perform that action at this time.
0 commit comments