Skip to content

Commit 6b96d39

Browse files
committed
fix: levm: bench: adjust gas limit and block limit in benchmarks for levm
1 parent bbace76 commit 6b96d39

File tree

1 file changed

+4
-4
lines changed
  • crates/vm/levm/bench/revm_comparison/src

1 file changed

+4
-4
lines changed

crates/vm/levm/bench/revm_comparison/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ pub fn run_with_levm(program: &str, runs: usize, calldata: &str) {
1717
for _ in 0..runs - 1 {
1818
let mut vm = new_vm_with_bytecode(bytecode.clone()).unwrap();
1919
vm.call_frames.last_mut().unwrap().calldata = calldata.clone();
20-
vm.env.gas_limit = 100_000_000;
21-
vm.env.block_gas_limit = 100_000_001;
20+
vm.env.gas_limit = u64::MAX - 1;
21+
vm.env.block_gas_limit = u64::MAX;
2222
let tx_report = black_box(vm.transact().unwrap());
2323
assert!(tx_report.result == TxResult::Success);
2424
}
2525
let mut vm = new_vm_with_bytecode(bytecode.clone()).unwrap();
2626
vm.call_frames.last_mut().unwrap().calldata = calldata.clone();
27-
vm.env.gas_limit = 100_000_000;
28-
vm.env.block_gas_limit = 100_000_001;
27+
vm.env.gas_limit = u64::MAX - 1;
28+
vm.env.block_gas_limit = u64::MAX;
2929
let tx_report = black_box(vm.transact().unwrap());
3030
assert!(tx_report.result == TxResult::Success);
3131

0 commit comments

Comments
 (0)