From 53c99ba6b5f96e1a8ee884d1ed99d0d0c84841ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vitor=20Naz=C3=A1rio=20Coelho?= Date: Sun, 9 Jun 2019 13:45:56 -0300 Subject: [PATCH] Drop invalid messages and set low priority (3.x) --- neo/Network/P2P/ProtocolHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neo/Network/P2P/ProtocolHandler.cs b/neo/Network/P2P/ProtocolHandler.cs index 099b2d6dca..487efda6dd 100644 --- a/neo/Network/P2P/ProtocolHandler.cs +++ b/neo/Network/P2P/ProtocolHandler.cs @@ -309,7 +309,7 @@ public ProtocolHandlerMailbox(Settings settings, Config config) protected override bool IsHighPriority(object message) { - if (!(message is Message msg)) return true; + if (!(message is Message msg)) return false; switch (msg.Command) { case MessageCommand.Consensus: @@ -327,7 +327,7 @@ protected override bool IsHighPriority(object message) protected override bool ShallDrop(object message, IEnumerable queue) { - if (!(message is Message msg)) return false; + if (!(message is Message msg)) return true; switch (msg.Command) { case MessageCommand.GetAddr: