rename argument from initial_peers to initial_peer

This commit is contained in:
yggverse 2025-06-07 16:42:47 +03:00
parent 491f7ef3c4
commit 525a487806
3 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ aquatic-crawler --infohash-source /path/to/info-hash-ipv4.json\
--torrent-tracker <TORRENT_TRACKER>
Define custom tracker(s) to preload the `.torrent` files info
--initial-peers <INITIAL_PEERS>
--initial-peer <INITIAL_PEER>
Define initial peer(s) to preload the `.torrent` files info
--enable-dht

View file

@ -30,7 +30,7 @@ pub struct Argument {
/// Define initial peer(s) to preload the `.torrent` files info
#[arg(long)]
pub initial_peers: Vec<String>,
pub initial_peer: Vec<String>,
/// Enable DHT resolver
#[arg(long, default_value_t = false)]

View file

@ -31,8 +31,8 @@ async fn main() -> anyhow::Result<()> {
trackers.insert(url::Url::from_str(&tracker)?);
}
let mut peers = Vec::with_capacity(argument.initial_peers.len());
for peer in argument.initial_peers {
let mut peers = Vec::with_capacity(argument.initial_peer.len());
for peer in argument.initial_peer {
peers.push(std::net::SocketAddr::from_str(&peer)?);
}