Skip to content

Commit

Permalink
Set gas limit in LoopsTest.sum_N
Browse files Browse the repository at this point in the history
  • Loading branch information
palinatolmach committed Sep 18, 2023
1 parent 7e10100 commit 43d91db
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
pragma solidity =0.8.13;

import "forge-std/Test.sol";
import "../src/KEVMCheats.sol";

contract LoopsTest is Test {
contract LoopsTest is Test, KEVMCheats {

uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
Expand Down Expand Up @@ -53,6 +54,7 @@ contract LoopsTest is Test {
// Amount of gas consumed per iteration: 178
// Number of iterations: n
// 9223372036854772642 // 178 = 51816696836262767
kevm.setGas(9223372036854772642);
vm.assume(n <= 51816696836262767);
uint s = 0;
while (0 < n) {
Expand Down

0 comments on commit 43d91db

Please sign in to comment.