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

test: closest_peers + small fix #78

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

RolandSherwin
Copy link
Member

@RolandSherwin RolandSherwin commented Apr 12, 2023

  • Also sets the kad::replication_factor that determines the a) The number of closer peers returned in response to a request, b) The number of closest peers to a key to search for in an iterative query. It does not affect the maximum number of nodes in a bucket; this is set by kad::K_VALUE.
  • Also makes sure client is not present among the closest_peers

@reviewpad reviewpad bot requested a review from oetyng April 12, 2023 07:53
@reviewpad reviewpad bot added Medium Medium sized PR waiting-for-review labels Apr 12, 2023
@RolandSherwin RolandSherwin force-pushed the closest_test branch 3 times, most recently from f6b318b to 14bece6 Compare April 12, 2023 07:58
@reviewpad reviewpad bot requested a review from bochaco April 12, 2023 08:43
safenode/src/network/mod.rs Outdated Show resolved Hide resolved
@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
@reviewpad
Copy link

reviewpad bot commented Apr 12, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
@maidsafe maidsafe deleted a comment from reviewpad bot Apr 12, 2023
safenode/src/network/mod.rs Outdated Show resolved Hide resolved
@reviewpad
Copy link

reviewpad bot commented Apr 12, 2023

AI-Generated Summary: This pull request contains 2 patches that focus on improvements and fixes in the tests and the network modules.

Patch 1 - test(network): validate closest peers

  • Adds a new test for validating closest peers in the network module
  • Updates the .github/workflows/merge.yml file to run network tests
  • Modifies safenode/src/network/mod.rs file

Patch 2 - fix(client): client should not be present inside closest_peers

  • Fixes an issue where the client's PeerId is not included in the calculation of closest peers
  • Changes the return type of get_closest_peers() method to a vector instead of a hashset
  • Updates the safenode/src/client/api.rs, safenode/src/network/mod.rs, and safenode/src/node/api.rs files.

@RolandSherwin RolandSherwin added this pull request to the merge queue Apr 12, 2023
Merged via the queue into maidsafe:main with commit 6040e2d Apr 12, 2023
@RolandSherwin RolandSherwin deleted the closest_test branch April 12, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Medium sized PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants