-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2378: Fix for network discovery state machine spin loop
If the node is unable to obtain many peers it continues to aggresively ask for peers. On a small localhost network this can cause high CPU usage as it repeatedly queries for peers in a state loop. This fix adds checks in the Ready state that allow a transition to Idle if: there are no sync peers, there are no sync peers other than the ones used last time, or there have been 10 rounds in a row where the node has not been able to obtain "enough" peers to enter "on connect" mode.
- Loading branch information
Showing
2 changed files
with
47 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters