Skip to content

Commit

Permalink
test: fix invariants
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Oct 28, 2024
1 parent ec1b866 commit 4288952
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions foundry_tests/handlers/VaultHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ contract VaultHandler is ExtendedTest {
deposit(_amount * 2);
}
}
_amount = bound(_amount, 0, vault.maxWithdraw(address(actor)));
_amount = bound(_amount, 0, vault.maxWithdraw(address(actor)) + 1);
if (_amount == 0) ghost_zeroWithdrawals++;

uint256 idle = vault.totalIdle();
Expand All @@ -122,7 +122,7 @@ contract VaultHandler is ExtendedTest {
mint(_amount * 2);
}
}
_amount = bound(_amount, 0, vault.balanceOf(address(actor)));
_amount = bound(_amount, 0, vault.balanceOf(address(actor)) + 1);
if (_amount == 0) ghost_zeroWithdrawals++;

uint256 idle = vault.totalIdle();
Expand Down Expand Up @@ -242,9 +242,9 @@ contract VaultHandler is ExtendedTest {
uint256 _amount
) public countCall("unreportedLoss") {
_amount = bound(_amount, 0, strategy.totalAssets() / 10);
if(_amount == 0) return;

if (_amount == 0) return;

// Simulate losing money
vm.prank(address(strategy));
asset.transfer(address(69), _amount);
Expand Down

0 comments on commit 4288952

Please sign in to comment.