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

Missing a condition for selecting peers for connection when having low triedPeers #4351

Closed
ishantiw opened this issue Oct 2, 2019 · 0 comments · Fixed by #4577
Closed

Missing a condition for selecting peers for connection when having low triedPeers #4351

ishantiw opened this issue Oct 2, 2019 · 0 comments · Fixed by #4577
Assignees
Milestone

Comments

@ishantiw
Copy link
Member

ishantiw commented Oct 2, 2019

Description

When we select peers for connection, we choose a ratio of triedPeers and newPeers but there is a condition missing that when we have triedPeers lower than 100 entries then we should select peers uniformly at random from all known peers (i.e., collection triedPeers and new peers).

Motivation

According to LIP0004, we should check the condition when triedPeers are less than 100. This will ensure that we are not choosing a big ratio of triedPeers when there are not enough peers in triedPeers in the list.

Acceptance Criteria

We can add an integration test that checks if the limit (triedPeers < 100) is passed to the p2p config and condition is triggered when the triedPeers are less than 100.

ManuGowda added a commit that referenced this issue Dec 2, 2019
…peers_for_connection

Add P2P condition to select peers for connection - Closed #4351
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants