-
Notifications
You must be signed in to change notification settings - Fork 43
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 unit tests for Tracker
#210
Add unit tests for Tracker
#210
Conversation
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
I'm double-checking the new Axum HTTP tracker and adding more tests.