Skip to content

Commit

Permalink
Fix: Collection was modified issue when slash executes
Browse files Browse the repository at this point in the history
  • Loading branch information
s2quake authored and OnedgeLee committed Nov 26, 2024
1 parent 53b3165 commit 31c7167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib9c/ValidatorDelegation/AbstainHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public List<PublicKey> FindToSlashAndAdd(IEnumerable<PublicKey> abstainList, lon
}
}

foreach (var history in History)
foreach (var history in History.ToArray())
{
history.Value.RemoveAll(abstainHeight => abstainHeight < lowerBound);
if (history.Value.Count == 0)
Expand Down

0 comments on commit 31c7167

Please sign in to comment.