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

refactor(core-p2p): discover new peers sooner #2771

Merged
merged 4 commits into from Jul 3, 2019

Conversation

Projects
None yet
4 participants
@supaiku0
Copy link
Contributor

commented Jul 3, 2019

At the moment we only discover new peers when hasMinimumPeers() returns false. This is generally too low. This PR changes discoverPeers to also look for new peers when the own peer count is significantly lower than the peer count of other peers.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)
@codecov-io

This comment has been minimized.

Copy link

commented Jul 3, 2019

Codecov Report

Merging #2771 into develop will increase coverage by 0.02%.
The diff coverage is 78.57%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2771      +/-   ##
===========================================
+ Coverage    65.44%   65.46%   +0.02%     
===========================================
  Files          363      363              
  Lines         8138     8140       +2     
  Branches       423      423              
===========================================
+ Hits          5326     5329       +3     
+ Misses        2774     2773       -1     
  Partials        38       38
Impacted Files Coverage Δ
packages/core-p2p/src/network-monitor.ts 67.81% <78.57%> (+0.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05cc9b9...5a6bdc7. Read the comment docs.

@codecov-io

This comment has been minimized.

Copy link

commented Jul 3, 2019

Codecov Report

Merging #2771 into develop will increase coverage by 0.02%.
The diff coverage is 78.57%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2771      +/-   ##
===========================================
+ Coverage    65.34%   65.37%   +0.02%     
===========================================
  Files          363      363              
  Lines         8150     8152       +2     
  Branches       387      387              
===========================================
+ Hits          5326     5329       +3     
+ Misses        2790     2789       -1     
  Partials        34       34
Impacted Files Coverage Δ
packages/core-p2p/src/network-monitor.ts 67.81% <78.57%> (+0.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a1ecce...f5c23fc. Read the comment docs.

@faustbrian faustbrian merged commit 5e17b5a into develop Jul 3, 2019

15 checks passed

ci/circleci: node10-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node10-e2e Your tests passed on CircleCI!
Details
ci/circleci: node10-functional Your tests passed on CircleCI!
Details
ci/circleci: node10-integration Your tests passed on CircleCI!
Details
ci/circleci: node10-unit Your tests passed on CircleCI!
Details
ci/circleci: node11-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node11-e2e Your tests passed on CircleCI!
Details
ci/circleci: node11-functional Your tests passed on CircleCI!
Details
ci/circleci: node11-integration Your tests passed on CircleCI!
Details
ci/circleci: node11-unit Your tests passed on CircleCI!
Details
ci/circleci: node12-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node12-e2e Your tests passed on CircleCI!
Details
ci/circleci: node12-functional Your tests passed on CircleCI!
Details
ci/circleci: node12-integration Your tests passed on CircleCI!
Details
ci/circleci: node12-unit Your tests passed on CircleCI!
Details

@ArkEcosystemBot ArkEcosystemBot deleted the refactor/core-p2p/peer-refresh branch Jul 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.