Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the case of GetData in ProtocolHandlerMailbox#ShallDrop #1201

Merged
merged 4 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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