瀏覽代碼

Fix flaky test `testFuzzFutureBlocks` (#5783)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Wael 3 月之前
父節點
當前提交
f9f7db03f3
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      test/utils/Blockhash.t.sol

+ 1 - 0
test/utils/Blockhash.t.sol

@@ -67,6 +67,7 @@ contract BlockhashTest is Test {
     function testFuzzFutureBlocks(uint256 offset, uint256 currentBlock) public {
         // Future blocks
         offset = bound(offset, 1, type(uint256).max);
+        currentBlock = bound(currentBlock, 0, type(uint256).max - offset);
         vm.roll(currentBlock);
 
         unchecked {