diff --git a/neo/Network/P2P/TaskManager.cs b/neo/Network/P2P/TaskManager.cs
index 56f4e12765..cd96547df8 100644
--- a/neo/Network/P2P/TaskManager.cs
+++ b/neo/Network/P2P/TaskManager.cs
@@ -25,13 +25,7 @@ private class Timer { }
private readonly NeoSystem system;
private const int MaxConncurrentTasks = 3;
-
- ///
- /// The limit `Blockchain.Singleton.MemPool.Capacity * 2` was the same value used in ProtocolHandler
- ///
- private static readonly int MaxCachedHashes = Blockchain.Singleton.MemPool.Capacity * 2;
- private readonly FIFOSet knownHashes = new FIFOSet(MaxCachedHashes);
-
+ private readonly FIFOSet knownHashes;
private readonly Dictionary globalTasks = new Dictionary();
private readonly Dictionary sessions = new Dictionary();
private readonly ICancelable timer = Context.System.Scheduler.ScheduleTellRepeatedlyCancelable(TimerInterval, TimerInterval, Context.Self, new Timer(), ActorRefs.NoSender);
@@ -42,6 +36,7 @@ private class Timer { }
public TaskManager(NeoSystem system)
{
this.system = system;
+ this.knownHashes = new FIFOSet(Blockchain.Singleton.MemPool.Capacity * 2);
}
private void OnHeaderTaskCompleted()