HTTP Tracker client: Add optional parameters with the rest of the announce params · Issue #1532 · torrust/torrust-tracker · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, when I'm testing, I have to simulate that a peer has completed downloading, as in this PR.
The process is pretty tedious because the client does not accept the event as an argument, so I have to make the request, change the hardcoded event, recompile it, and execute it again.
It would be nice to add a parameter.
How to do it now
Change the default event from Completed to Started
In bittorrent_tracker_client::http::client::requests::announce::QueryBuilder
implQueryBuilder{/// # Panics////// Will panic if the default info-hash value is not a valid info-hash.#[must_use]pubfnwith_default_values() -> QueryBuilder{let default_announce_query = Query{info_hash:InfoHash::from_str("9c38422213e30bff212b30c360d26f9a02136422").unwrap().0,// DevSkim: ignore DS173237peer_addr:IpAddr::V4(Ipv4Addr::new(192,168,1,88)),downloaded:0,uploaded:0,peer_id:PeerId(*b"-qB00000000000000001").0,port:17548,left:0,event:Some(Event::Completed),// <- thiscompact:Some(Compact::NotAccepted),};Self{announce_query: default_announce_query,}}}
josecelano
changed the title
HTTP Tracker client: Add optional parameters with the reset of the announce params
HTTP Tracker client: Add optional parameters with the rest of the announce params
May 21, 2025
Uh oh!
There was an error while loading. Please reload this page.
Parent issue: #669
Relates to: #1533
Sometimes, when I'm testing, I have to simulate that a peer has completed downloading, as in this PR.
The process is pretty tedious because the client does not accept the event as an argument, so I have to make the request, change the hardcoded event, recompile it, and execute it again.
It would be nice to add a parameter.
How to do it now
Completed
toStarted
In
bittorrent_tracker_client::http::client::requests::announce::QueryBuilder
cargo run -p torrust-tracker-client --bin http_tracker_client announce http://127.0.0.1:7070 443c7602b4fde83d1154d6d9da48808418b181b6 | jq
Started
toCompleted
And rerun the client.
The downloads counter does not increase if the peer does not transition from
Started
toCompleted
Proposal
Add an option parameter to pass the event (and other params):
The text was updated successfully, but these errors were encountered: