Skip to content

Commit

Permalink
Remove the case of GetData in ProtocolHandlerMailbox#ShallDrop (neo-p…
Browse files Browse the repository at this point in the history
  • Loading branch information
doubiliu authored and Tommo-L committed Jun 22, 2020
1 parent dfe21c1 commit c04de2a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions neo.UnitTests/Network/P2P/UT_ProtocolHandlerMailbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ public void ProtocolHandlerMailbox_Test_ShallDrop()
msg = Message.Create(MessageCommand.Inv, s);
uut.ShallDrop(msg, emptyQueue).Should().Be(false);
uut.ShallDrop(msg, new object[] { msg }).Should().Be(false);
// GetData (drop)
msg = Message.Create(MessageCommand.GetData, s);
uut.ShallDrop(msg, emptyQueue).Should().Be(false);
uut.ShallDrop(msg, new object[] { msg }).Should().Be(true);
// NotFound (no drop)
msg = Message.Create(MessageCommand.NotFound, s);
uut.ShallDrop(msg, emptyQueue).Should().Be(false);
Expand Down
1 change: 0 additions & 1 deletion neo/Network/P2P/ProtocolHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ internal protected override bool ShallDrop(object message, IEnumerable queue)
{
case MessageCommand.GetAddr:
case MessageCommand.GetBlocks:
case MessageCommand.GetData:
case MessageCommand.GetHeaders:
case MessageCommand.Mempool:
return queue.OfType<Message>().Any(p => p.Command == msg.Command);
Expand Down

0 comments on commit c04de2a

Please sign in to comment.