@@ -529,21 +529,16 @@ contract DelegationManager is
529529 bool receiveAsTokens
530530 ) internal {
531531 _checkInputArrayLengths (tokens.length , withdrawal.strategies.length );
532- if (withdrawal.delegatedTo == address (this )) {
533- // If this is a redistribution withdrawal // TODO: make this cleaner
534- require (receiveAsTokens, WithdrawerNotCaller ());
535- } else {
536- require (msg .sender == withdrawal.withdrawer, WithdrawerNotCaller ());
537- }
532+
533+ require (msg .sender == withdrawal.withdrawer, WithdrawerNotCaller ());
538534 bytes32 withdrawalRoot = calculateWithdrawalRoot (withdrawal);
539535 require (pendingWithdrawals[withdrawalRoot], WithdrawalNotQueued ());
540536
541537 uint256 [] memory prevSlashingFactors;
542538 {
543- // The slashableUntil block is inclusive, so we verify that the current block number exceeds it
544- // before allowing the withdrawal to be completed.
545- uint32 delayBlocks = withdrawal.delegatedTo == address (this ) ? 4 days : MIN_WITHDRAWAL_DELAY_BLOCKS;
546- uint32 slashableUntil = withdrawal.startBlock + delayBlocks;
539+ // slashableUntil is block inclusive so we need to check if the current block is strictly greater than the slashableUntil block
540+ // meaning the withdrawal can be completed.
541+ uint32 slashableUntil = withdrawal.startBlock + MIN_WITHDRAWAL_DELAY_BLOCKS;
547542 require (uint32 (block .number ) > slashableUntil, WithdrawalDelayNotElapsed ());
548543
549544 // Given the max magnitudes of the operator the staker was originally delegated to, calculate
@@ -713,7 +708,9 @@ contract DelegationManager is
713708 // Emit event for operator shares being slashed
714709 emit OperatorSharesSlashed (operator, strategy, totalDepositSharesToBurn);
715710
716- _getShareManager (strategy).increaseBurnOrRedistributableShares (operatorSet, slashId, strategy, totalDepositSharesToBurn);
711+ _getShareManager (strategy).increaseBurnOrRedistributableShares (
712+ operatorSet, slashId, strategy, totalDepositSharesToBurn
713+ );
717714
718715 return totalDepositSharesToBurn;
719716 }
0 commit comments