Skip to content

Commit 4ed9c83

Browse files
committed
fix: effectBlock
1 parent db00529 commit 4ed9c83

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/test/unit/DelegationUnit.t.sol

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6514,7 +6514,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage
65146514
assertFalse(delegationManager.pendingWithdrawals(withdrawalRoot), "withdrawalRoot should be completed and marked false now");
65156515
}
65166516

6517-
function test_completeQueuedWithdrawals_OutOfOrderBlocking(Randomness r) public {
6517+
function testFuzz_completeQueuedWithdrawals_OutOfOrderBlocking(Randomness r) public {
65186518
uint256 totalDepositShares = r.Uint256(4, 100 ether);
65196519
uint256 depositSharesPerWithdrawal = totalDepositShares / 4;
65206520

@@ -6525,7 +6525,10 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage
65256525
QueuedWithdrawalParams[] memory queuedParams = new QueuedWithdrawalParams[](4);
65266526
Withdrawal[] memory withdrawals = new Withdrawal[](4);
65276527

6528+
uint256 startBlock = block.number;
6529+
65286530
for (uint256 i; i < 4; ++i) {
6531+
cheats.roll(startBlock + i);
65296532
(
65306533
QueuedWithdrawalParams[] memory params,
65316534
Withdrawal memory withdrawal,
@@ -6539,10 +6542,12 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage
65396542
(queuedParams[i], withdrawals[i]) = (params[0], withdrawal);
65406543
}
65416544

6542-
uint256 startBlock = block.number;
65436545
uint256 delay = delegationManager.minWithdrawalDelayBlocks();
65446546

65456547
cheats.startPrank(defaultStaker);
6548+
cheats.roll(startBlock);
6549+
6550+
assertEq(queuedParams[0].effectBlock, block.timestamp);
65466551
delegationManager.queueWithdrawals(queuedParams[0].toArray());
65476552
cheats.roll(startBlock + 1);
65486553
delegationManager.queueWithdrawals(queuedParams[1].toArray());

0 commit comments

Comments
 (0)