Skip to content

Commit

Permalink
fix: use a single deallocation queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Oct 15, 2024
1 parent 4fc6339 commit fc1c22f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/contracts/core/AllocationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ contract AllocationManager is
// Calculate the effectTimestamp for the modification
if (info.pendingDiff < 0) {
info.effectTimestamp = uint32(block.timestamp) + DEALLOCATION_DELAY;

// Add the operatorSet to the modification queue and update the allocation
// in storage
modificationQueue[msg.sender][allocation.strategy].pushBack(operatorSetKey);
} else if (info.pendingDiff > 0) {
info.effectTimestamp = uint32(block.timestamp) + operatorAllocationDelay;

Expand All @@ -168,10 +172,6 @@ contract AllocationManager is
info.encumberedMagnitude = _addInt128(info.encumberedMagnitude, info.pendingDiff);
require(info.encumberedMagnitude <= maxMagnitude, InsufficientAllocatableMagnitude());
}

// Add the operatorSet to the modification queue and update the allocation
// in storage
modificationQueue[msg.sender][allocation.strategy].pushBack(operatorSetKey);
_updateMagnitudeInfo({
operator: msg.sender,
strategy: allocation.strategy,
Expand Down

0 comments on commit fc1c22f

Please sign in to comment.