Skip to content

Commit 678f212

Browse files
committed
docs: add clarifying comment on not updating pending allocs on dealloc
1 parent e0f8c55 commit 678f212

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/contracts/core/AVSDirectory.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,8 @@ contract AVSDirectory is
687687
// Newly configured magnitude is less than current value.
688688
// Therefore we handle this as a deallocation
689689

690+
// Note: MAX_PENDING_UPDATES == 1, so we do not have to decrement any allocations
691+
690692
// 1. push PendingFreeMagnitude and respective array index into (op,opSet,Strategy) queued deallocations
691693
uint256 index = _pendingFreeMagnitude[operator][allocation.strategy].length;
692694
_pendingFreeMagnitude[operator][allocation.strategy].push(
@@ -696,6 +698,7 @@ contract AVSDirectory is
696698
})
697699
);
698700
_queuedDeallocationIndices[operator][allocation.strategy][operatorSetKey].push(index);
701+
699702
} else if (allocation.magnitudes[i] > uint64(currentMagnitude)) {
700703
// Newly configured magnitude is greater than current value.
701704
// Therefore we handle this as an allocation

0 commit comments

Comments
 (0)