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

restrict max concurrent outbound dials #6860

Conversation

abhijeetbhagat
Copy link
Contributor

@abhijeetbhagat abhijeetbhagat commented Feb 28, 2024

closes #6778

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks pretty good!
I believe this is already complete.

I'd like to see another test case that adds a few peers

  • starts all allowed pendingOut (until max_concurrent is satisfied)
  • calls on_active_outgoing_established
    ensures peers are now ::Out and counters are as expected

crates/net/network/src/peers/manager.rs Outdated Show resolved Hide resolved
crates/net/network/src/peers/manager.rs Outdated Show resolved Hide resolved
crates/net/network/src/peers/manager.rs Show resolved Hide resolved
@mattsse mattsse added C-enhancement New feature or request A-networking Related to networking in general labels Feb 28, 2024
@abhijeetbhagat
Copy link
Contributor Author

@mattsse can you please check if the test case looks good?

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last test nit

crates/net/network/src/peers/manager.rs Outdated Show resolved Hide resolved
@abhijeetbhagat
Copy link
Contributor Author

@mattsse please check.

@abhijeetbhagat
Copy link
Contributor Author

@mattsse please check

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

ty!

@mattsse mattsse added this pull request to the merge queue Mar 4, 2024
Merged via the queue into paradigmxyz:main with commit 0d3b77f Mar 4, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

max_concurrent_outbound_dials does not restrict max concurrent outbound dials
2 participants