Skip to content

Commit

Permalink
DData: Fix BCL update causing DeltaPropagationSelector throwing Index…
Browse files Browse the repository at this point in the history
…OutOfBoundException (#7462)
  • Loading branch information
Arkatufus authored Jan 13, 2025
1 parent 94bcc66 commit 5c7c967
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public ImmutableDictionary<Address, DeltaPropagation> CollectPropagations()
else
{
var i = (int)(_deltaNodeRoundRobinCounter % all.Length);
slice = all.Slice(i, sliceSize).ToImmutableArray();
var endIndex = i + sliceSize;
if (endIndex > all.Length) endIndex = all.Length;
slice = all[i..endIndex];

if (slice.Length != sliceSize)
slice = slice.AddRange(all.Take(sliceSize - slice.Length));
Expand Down

0 comments on commit 5c7c967

Please sign in to comment.