From 58fc98774e985118c1b60ba90ed8128cf4ba58e7 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Fri, 31 May 2024 20:08:57 +0100 Subject: [PATCH] Use NonBlocking ConcurrentDictionary in a couple places --- src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs b/src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs index 84105f69092..921d5aafb01 100644 --- a/src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs +++ b/src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs @@ -284,7 +284,7 @@ public readonly void Dispose() // Track ALL of the recently re-committed persisted nodes. This is so that we don't accidentally remove // recommitted persisted nodes (which will not get re-persisted). - private ConcurrentDictionary _persistedLastSeens = new(); + private NonBlocking.ConcurrentDictionary _persistedLastSeens = new(); private bool _lastPersistedReachedReorgBoundary; private Task _pruningTask = Task.CompletedTask; @@ -1264,7 +1264,7 @@ void ClearCommitSetQueue() PruneCache(); KeyValuePair[] nodesCopy = _dirtyNodes.AllNodes.ToArray(); - ConcurrentDictionary wasPersisted = new(); + NonBlocking.ConcurrentDictionary wasPersisted = new(); void PersistNode(TrieNode n, Hash256? address, TreePath path) { if (n.Keccak is null) return;