How do I know that the Kademlia bootstrap process failed? #5211
-
Hi! Imagine a libp2p-enabled node connecting with other nodes using Kademlia DHT with a few bootstrap nodes. SwarmEvent::OutgoingConnectionError {
connection_id,
peer_id,
error,
} If there are multiple bootstrap nodes, I could, ofc, track which connections failed to deduce that the bootstrapping process failed. My question is: Is there a specific event stating that bootstrapping has failed independently of how many bootstrap nodes there are? |
Beta Was this translation helpful? Give feedback.
Answered by
vnermolaev
Mar 6, 2024
Replies: 1 comment
-
If anyone wonders, the way it works is
kad::Event::OutboundQueryProgressed {
stats,
step: kad::ProgressStep { last, .. },
..
} if last => {
let mut update = format!(
"Bootstrap nodes connection status (success)/(failure)/(total): ({})/({})/({})",
stats.num_successes(),
stats.num_failures(),
stats.num_requests()
);
....
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vnermolaev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anyone wonders, the way it works is