Skip to content

Commit

Permalink
docs: add clarifying comment on not updating pending allocs on dealloc
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Aug 29, 2024
1 parent a21eb41 commit e70e85d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/contracts/core/AVSDirectory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ contract AVSDirectory is
// Newly configured magnitude is less than current value.
// Therefore we handle this as a deallocation

// Note: MAX_PENDING_UPDATES == 1, so we do not have to decrement any allocations

// 1. push PendingFreeMagnitude and respective array index into (op,opSet,Strategy) queued deallocations
uint256 index = _pendingFreeMagnitude[operator][allocation.strategy].length;
_pendingFreeMagnitude[operator][allocation.strategy].push(
Expand All @@ -697,6 +699,7 @@ contract AVSDirectory is
})
);
_queuedDeallocationIndices[operator][allocation.strategy][operatorSetKey].push(index);

} else if (allocation.magnitudes[i] > uint64(currentMagnitude)) {
// Newly configured magnitude is greater than current value.
// Therefore we handle this as an allocation
Expand Down

0 comments on commit e70e85d

Please sign in to comment.