diff --git a/src/Nethermind/Nethermind.State/StateProvider.cs b/src/Nethermind/Nethermind.State/StateProvider.cs index 1d0cfa2ac28..4ecaff55d2a 100644 --- a/src/Nethermind/Nethermind.State/StateProvider.cs +++ b/src/Nethermind/Nethermind.State/StateProvider.cs @@ -26,6 +26,7 @@ internal class StateProvider private const int StartCapacity = Resettable.StartCapacity; private readonly ResettableDictionary
> _intraBlockCache = new(); private readonly ResettableHashSet _committedThisRound = new(); + private readonly HashSet _nullAccountReads = new(); // Only guarding against hot duplicates so filter doesn't need to be too big // Note: // False negatives are fine as they will just result in a overwrite set @@ -508,7 +509,7 @@ public void Commit(IReleaseSpec releaseSpec, IWorldStateTracer stateTracer, bool // because it was not committed yet it means that the just cache is the only state (so it was read only) if (isTracing && change.ChangeType == ChangeType.JustCache) { - _readsForTracing.Add(change.Address); + _nullAccountReads.Add(change.Address); continue; } @@ -597,7 +598,7 @@ public void Commit(IReleaseSpec releaseSpec, IWorldStateTracer stateTracer, bool if (isTracing) { - foreach (Address nullRead in _readsForTracing) + foreach (Address nullRead in _nullAccountReads) { // // this may be enough, let us write tests stateTracer.ReportAccountRead(nullRead); @@ -606,7 +607,7 @@ public void Commit(IReleaseSpec releaseSpec, IWorldStateTracer stateTracer, bool Resettable