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

Disable peer discovery if cache exists #887

Merged
merged 1 commit into from Nov 24, 2018

Conversation

Projects
None yet
2 participants
@lontivero
Copy link
Contributor

commented Nov 24, 2018

This PR closes #748.

Problem

When we kill internet Wasabi cannot connect to peers and that's why after one minute it tries to discover new peers aggressively, that process uses a lot of cpu because the not IO operations happening when no internet is available.

Solution

AddressManager works as a nodes address' cache that make unnecessary to rediscover peers again and again. The discovery process is only needed the first time we run Wasabi after a clean installation.

For this reason, if we can load the peers addresses from the file (cache) we can disable the discovery mechanism.

@nopara73 nopara73 merged commit bcc6045 into zkSNACKs:master Nov 24, 2018

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
CodeFactor No issues found.
Details
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.