forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
properly respect the max_connected threshold
let the background thread of the connection manager respect the `max_connected` threshold (not entirely really, we can reach up to `max_connected + 1`). This is done by refactoring the connection establishment to not establish all connections but only connections that we know we will maintain for sure. This also is lighter overall than the old approach. but it's also slower since connections are tried sequentially, we don't need the speed here anyways since if an electrum request fails we fail back to try all connections which is a logic that isn't controlled by the connection manager in any way.
- Loading branch information
1 parent
69db230
commit eead6a8
Showing
2 changed files
with
52 additions
and
44 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