From 31c7167c7556df4fa4846553ac642f0fb852d73a Mon Sep 17 00:00:00 2001 From: s2quake Date: Thu, 21 Nov 2024 10:57:24 +0900 Subject: [PATCH] Fix: Collection was modified issue when slash executes --- Lib9c/ValidatorDelegation/AbstainHistory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c/ValidatorDelegation/AbstainHistory.cs b/Lib9c/ValidatorDelegation/AbstainHistory.cs index c90a987361..430d2c78cd 100644 --- a/Lib9c/ValidatorDelegation/AbstainHistory.cs +++ b/Lib9c/ValidatorDelegation/AbstainHistory.cs @@ -78,7 +78,7 @@ public List FindToSlashAndAdd(IEnumerable abstainList, lon } } - foreach (var history in History) + foreach (var history in History.ToArray()) { history.Value.RemoveAll(abstainHeight => abstainHeight < lowerBound); if (history.Value.Count == 0)