-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: avoid duplicate autoconnection attempt (#1742)
* feat: avoid duplicate autoconnection attempt Gossip autoconnection could result in two nodes attempting to connect to each other concurrently. To fix this issue, only one node initiate the connection now. The selection criteria is arbitrary but deterministic, currently the greater zid of both. * refactor: extract autoconnect node selection in a dedicated function * refactor: add a configuration option for autoconnection * revert: revert JSON config formatting * fix: lint * feat: add an "always" autoconnection strategy * docs: document DEFAULT_CONFIG.json5 * Update DEFAULT_CONFIG.json5 Co-authored-by: Oussama Teffahi <70609372+oteffahi@users.noreply.github.com> * feat: make strategy dependent on the connected node * Update DEFAULT_CONFIG.json5 Co-authored-by: Oussama Teffahi <70609372+oteffahi@users.noreply.github.com> * Update DEFAULT_CONFIG.json5 Co-authored-by: Oussama Teffahi <70609372+oteffahi@users.noreply.github.com> * fix: remove dead code * feat: introduce target-dependent value * fix: lint * fix: remove dead code * fix: remove debug code --------- Co-authored-by: Oussama Teffahi <70609372+oteffahi@users.noreply.github.com>
- Loading branch information
Showing
16 changed files
with
539 additions
and
112 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.