mirror of
https://github.com/YGGverse/yps.git
synced 2026-03-31 08:55:28 +00:00
cleanup
This commit is contained in:
parent
4d1455d34e
commit
08436591f6
1 changed files with 5 additions and 5 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -44,24 +44,24 @@ fn main() -> Result<()> {
|
|||
match p.response {
|
||||
Some(response) => {
|
||||
for peer in response.peers {
|
||||
crawl(peer.key, &config, &mut ygg, &mut key, &mut tcp, &mut udp)?;
|
||||
crawl(peer.key, &config, &mut ygg, &mut key, &mut tcp, &mut udp)?
|
||||
}
|
||||
}
|
||||
None => println!("node has no peers to connect."),
|
||||
}
|
||||
println!("operation completed!");
|
||||
if !key.is_empty() {
|
||||
println!("\tkeys crawled: {}", key.len());
|
||||
println!("\tkeys crawled: {}", key.len())
|
||||
}
|
||||
if let Some(tcp) = tcp {
|
||||
println!("\tTCP: {}", tcp.len());
|
||||
println!("\t\tfound: {}", tcp.values().filter(|v| **v).count());
|
||||
println!("\t\ttotal: {}", tcp.len());
|
||||
println!("\t\ttotal: {}", tcp.len())
|
||||
}
|
||||
if let Some((udp, _)) = udp {
|
||||
println!("\tUDP: {}", udp.len());
|
||||
println!("\t\tfound: {}", udp.values().filter(|v| **v).count());
|
||||
println!("\t\ttotal: {}", udp.len());
|
||||
println!("\t\ttotal: {}", udp.len())
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ fn crawl(
|
|||
if let Some(l) = config.latency {
|
||||
std::thread::sleep(Duration::from_secs(l))
|
||||
}
|
||||
crawl(k, config, ygg, key, tcp, udp)?;
|
||||
crawl(k, config, ygg, key, tcp, udp)?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue