Add unit tests for Tracker#210
Merged
josecelano merged 12 commits intotorrust:developfrom Mar 4, 2023
Merged
Conversation
Member
Author
|
Hi @da2ce7 @WarmBeer, I've just realized we have a duplicate struct: /// Swarm statistics for one torrent.
/// Swarm metadata dictionary in the scrape response.
/// BEP 48: <https://www.bittorrent.org/beps/bep_0048.html>
#[derive(Debug, PartialEq, Default)]
pub struct SwarmMetadata {
pub complete: u32, // The number of active peers that have completed downloading (seeders)
pub downloaded: u32, // The number of peers that have ever completed downloading
pub incomplete: u32, // The number of active peers that have not completed downloading (leechers)
}
/// Swarm statistics for one torrent.
/// Alternative struct for swarm metadata in scrape response.
#[derive(Debug, PartialEq, Default)]
pub struct SwarmStats {
pub completed: u32, // The number of peers that have ever completed downloading
pub seeders: u32, // The number of active peers that have completed downloading (seeders)
pub leechers: u32, // The number of active peers that have not completed downloading (leechers)
}I introduced the I would keep both and use On the other hand, It could be confusing to use two different names, although the BitTorrent specification (BEPs) do that all the time. The |
…cker The `Tracker` is responsible for the authentication in the HTTP protocol.
525cd30 to
fad6834
Compare
Tracker functions
Tracker functionsTracker
0606799 to
71589c4
Compare
71589c4 to
7fb92b5
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm double-checking the new Axum HTTP tracker and adding more tests.