diff --git a/src/SlashingRegistryCoordinator.sol b/src/SlashingRegistryCoordinator.sol index 0eae566d..0e479802 100644 --- a/src/SlashingRegistryCoordinator.sol +++ b/src/SlashingRegistryCoordinator.sol @@ -830,7 +830,8 @@ contract SlashingRegistryCoordinator is } else if (stakeType == IStakeRegistryTypes.StakeType.TOTAL_SLASHABLE) { // For slashable stake quorums, ensure lookAheadPeriod is less than DEALLOCATION_DELAY require( - AllocationManager(address(allocationManager)).DEALLOCATION_DELAY() > lookAheadPeriod, + lookAheadPeriod + <= AllocationManager(address(allocationManager)).DEALLOCATION_DELAY(), LookAheadPeriodTooLong() ); stakeRegistry.initializeSlashableStakeQuorum( diff --git a/test/unit/SlashingRegistryCoordinatorUnit.t.sol b/test/unit/SlashingRegistryCoordinatorUnit.t.sol index a2cf0c4e..d9daf145 100644 --- a/test/unit/SlashingRegistryCoordinatorUnit.t.sol +++ b/test/unit/SlashingRegistryCoordinatorUnit.t.sol @@ -735,7 +735,7 @@ contract SlashingRegistryCoordinator_CreateSlashableStakeQuorum is uint32 deallocationDelay = AllocationManager(address(coreDeployment.allocationManager)).DEALLOCATION_DELAY(); - uint32 tooLongLookAheadPeriod = deallocationDelay; + uint32 tooLongLookAheadPeriod = deallocationDelay + 1; vm.prank(proxyAdminOwner); vm.expectRevert(LookAheadPeriodTooLong.selector);