Skip to content

Commit

Permalink
Use NonBlocking ConcurrentDictionary in a couple places (#7122)
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams authored May 31, 2024
1 parent e206b44 commit bee7a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<HashAndTinyPathAndHash, long> _persistedLastSeens = new();
private NonBlocking.ConcurrentDictionary<HashAndTinyPathAndHash, long> _persistedLastSeens = new();

private bool _lastPersistedReachedReorgBoundary;
private Task _pruningTask = Task.CompletedTask;
Expand Down Expand Up @@ -1264,7 +1264,7 @@ void ClearCommitSetQueue()
PruneCache();
KeyValuePair<DirtyNodesCache.Key, TrieNode>[] nodesCopy = _dirtyNodes.AllNodes.ToArray();

ConcurrentDictionary<DirtyNodesCache.Key, bool> wasPersisted = new();
NonBlocking.ConcurrentDictionary<DirtyNodesCache.Key, bool> wasPersisted = new();
void PersistNode(TrieNode n, Hash256? address, TreePath path)
{
if (n.Keccak is null) return;
Expand Down

0 comments on commit bee7a6b

Please sign in to comment.