From 854309e673c293438fdde3dd4ff6b7e872243ea4 Mon Sep 17 00:00:00 2001 From: ChefMist <133624774+ChefMist@users.noreply.github.com> Date: Mon, 8 Apr 2024 17:44:24 +0800 Subject: [PATCH] test: fix too many input rejected for CLFees --- test/pool-cl/CLFees.t.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/pool-cl/CLFees.t.sol b/test/pool-cl/CLFees.t.sol index c152b3e8..6e5ea75b 100644 --- a/test/pool-cl/CLFees.t.sol +++ b/test/pool-cl/CLFees.t.sol @@ -97,9 +97,10 @@ contract CLFeesTest is Test, Deployers, TokenFixture, GasSnapshot { } function testNoProtocolFee(uint16 protocolSwapFee) public { - vm.assume(protocolSwapFee < 2 ** 16); - vm.assume(protocolSwapFee >> 8 >= 4); - vm.assume(protocolSwapFee % 256 >= 4); + // Early return instead of vm.assume (too many input rejected) + if (protocolSwapFee >= 2 ** 16) return; + if (protocolSwapFee >> 8 < 4) return; + if (protocolSwapFee % 256 < 4) return; protocolFeeController.setSwapFeeForPool(key.toId(), protocolSwapFee); manager.setProtocolFeeController(IProtocolFeeController(protocolFeeController));