Skip to content

Commit e70e85d

Browse files
committed
docs: add clarifying comment on not updating pending allocs on dealloc
1 parent a21eb41 commit e70e85d

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
@@ -688,6 +688,8 @@ contract AVSDirectory is
688688
// Newly configured magnitude is less than current value.
689689
// Therefore we handle this as a deallocation
690690

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

0 commit comments

Comments
 (0)