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 for DHTHealthManager returning incorrect results #6045

Merged
merged 3 commits into from
Apr 1, 2021

Conversation

egbertbouman
Copy link
Member

This PR fixes an issue with increased peer counts being returned by the DHTHealthManager. The problem is that when we send BEP33 responses for active downloads, they are picked up by the DHTHealthManager and added to the nearest infohash. A similar issue could present when we receive BEP33 responses for active downloads.

To fix the issue we keep track of transaction_id -> infohash. Unfortunately, this means that we have to process all incoming and outgoing DHT messages. Note that I'm assuming that transaction_ids for in-flight requests are unique.

@egbertbouman egbertbouman force-pushed the bep33_fix branch 2 times, most recently from 89eaa9b to db84530 Compare March 31, 2021 19:32
@egbertbouman egbertbouman marked this pull request as ready for review March 31, 2021 19:58
@sonarcloud
Copy link

sonarcloud bot commented Mar 31, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ichorid ichorid merged commit 78204b1 into Tribler:main Apr 1, 2021
@egbertbouman egbertbouman deleted the bep33_fix branch January 28, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants