diff --git a/src/neo/Ledger/Blockchain.cs b/src/neo/Ledger/Blockchain.cs index 23e87ae05d..bf26f6c70d 100644 --- a/src/neo/Ledger/Blockchain.cs +++ b/src/neo/Ledger/Blockchain.cs @@ -291,11 +291,9 @@ private void OnInventory(IInventory inventory, bool relay = true) Transaction transaction => OnNewTransaction(transaction), _ => OnNewInventory(inventory) }; - if (result == VerifyResult.Succeed) + if (result == VerifyResult.Succeed && relay) { - if (relay) system.LocalNode.Tell(new LocalNode.RelayDirectly { Inventory = inventory }); - foreach (IP2PPlugin plugin in Plugin.P2PPlugins) - plugin.OnVerifiedInventory(inventory); + system.LocalNode.Tell(new LocalNode.RelayDirectly { Inventory = inventory }); } SendRelayResult(inventory, result); } diff --git a/src/neo/Plugins/IP2PPlugin.cs b/src/neo/Plugins/IP2PPlugin.cs index ea792e721c..5479373ad4 100644 --- a/src/neo/Plugins/IP2PPlugin.cs +++ b/src/neo/Plugins/IP2PPlugin.cs @@ -1,11 +1,9 @@ using Neo.Network.P2P; -using Neo.Network.P2P.Payloads; namespace Neo.Plugins { public interface IP2PPlugin { bool OnP2PMessage(Message message) => true; - void OnVerifiedInventory(IInventory inventory) { } } }