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

Add expected connections to connmngr #845

Merged
merged 6 commits into from
Jan 23, 2023
Merged

Conversation

Menduist
Copy link
Contributor

@Menduist Menduist commented Jan 19, 2023

This system allows you to wait for a connection from a specific peer. It will bypass the maxConnectionsPerPeer, since you know you are waiting for him (but not the global limit of connections)

This is useful for AutoNat, HolePunching, maybe others

Also.. turns out the maxConnectionsPerPeer was off by one (hurray). I fixed it here, but maybe we should leave it as is to avoid changing the behavior. idk
EDIT: reverted, breaks to many things

@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Merging #845 (2b05f49) into unstable (7d9c43a) will increase coverage by 0.01%.
The diff coverage is 95.65%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable     #845      +/-   ##
============================================
+ Coverage     83.73%   83.74%   +0.01%     
============================================
  Files            85       85              
  Lines         15023    15047      +24     
============================================
+ Hits          12579    12601      +22     
- Misses         2444     2446       +2     
Impacted Files Coverage Δ
libp2p/connmanager.nim 90.28% <95.65%> (-0.52%) ⬇️
libp2p/multicodec.nim 100.00% <0.00%> (+8.69%) ⬆️

Copy link
Contributor Author

@Menduist Menduist left a comment

Choose a reason for hiding this comment

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

Can't approve, but I approve :)

@diegomrsantos diegomrsantos enabled auto-merge (squash) January 23, 2023 18:38
@diegomrsantos diegomrsantos merged commit 351bda2 into unstable Jan 23, 2023
@diegomrsantos diegomrsantos deleted the expectconnection branch January 23, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants