Skip to content

Commit

Permalink
Optimize inventory (#2659)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored Apr 1, 2022
1 parent 24389c6 commit a02209a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/neo/Network/P2P/RemoteNode.ProtocolHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private void OnHeadersMessageReceived(HeadersPayload payload)

private void OnInventoryReceived(IInventory inventory)
{
knownHashes.Add(inventory.Hash);
if (!knownHashes.Add(inventory.Hash)) return;
pendingKnownHashes.Remove(inventory.Hash);
system.TaskManager.Tell(inventory);
switch (inventory)
Expand Down

0 comments on commit a02209a

Please sign in to comment.