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

Fix discovery packet size #2252

Merged
merged 5 commits into from
May 11, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
code review
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
  • Loading branch information
atoulme committed May 11, 2021
commit fb2550925b4cb89f8e4103e14302031b729034e5
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ public void neighborsPacketLimited() {
assertThat(neighbors.getNodes()).hasSize(13);
assertThat(neighborsPacket.packet.encode().length()).isLessThanOrEqualTo(1280); // under max MTU

// Assert that after removing those 13 items we're left with either 4 or 5.
// If we are left with 5, the test peer was returned as an item, assert that this is the case.
// Assert that after removing those 13 items we're left with either 7 or 8.
// If we are left with 8, the test peer was returned as an item, assert that this is the case.
otherPeers.removeAll(neighbors.getNodes());
assertThat(otherPeers.size()).isBetween(7, 8);
if (otherPeers.size() == 8) {
Expand Down