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

Fix handshake and dial timeout #247

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Fix handshake and dial timeout #247

merged 4 commits into from
Oct 28, 2024

Conversation

yzang2019
Copy link
Contributor

@yzang2019 yzang2019 commented Oct 28, 2024

Describe your changes and provide context

Sometimes a peer could end up having multiple different IP addresses in the network, some IP are stale, this will cause dial always fail and got stuck. Currently the dial and handshake timeout is not passed in correctly, leading to the fact that the timeout is infinite. So we should enable dial timeout to fix this issue.

Testing performed to validate your change

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Project coverage is 58.07%. Comparing base (29b1ac3) to head (4b1e977).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/blocksync/pool.go 66.66% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #247      +/-   ##
==========================================
+ Coverage   58.03%   58.07%   +0.03%     
==========================================
  Files         249      249              
  Lines       34510    34515       +5     
==========================================
+ Hits        20029    20043      +14     
- Misses      12880    12881       +1     
+ Partials     1601     1591      -10     
Files with missing lines Coverage Δ
internal/p2p/peermanager.go 79.33% <100.00%> (+0.02%) ⬆️
node/node.go 58.60% <100.00%> (+0.21%) ⬆️
internal/blocksync/pool.go 79.10% <66.66%> (+2.18%) ⬆️

... and 17 files with indirect coverage changes

@yzang2019 yzang2019 enabled auto-merge (squash) October 28, 2024 16:02
@yzang2019 yzang2019 merged commit 3ee0e7f into main Oct 28, 2024
22 checks passed
Kbhat1 pushed a commit that referenced this pull request Nov 13, 2024
* Fix handshake and dial timeout

* Add some logs

* Fix bpr requester different error

* fix locking
yzang2019 added a commit that referenced this pull request Dec 3, 2024
* Fix handshake and dial timeout

* Add some logs

* Fix bpr requester different error

* fix locking
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