mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-21 22:01:34 +00:00
protocols/kad: Extend emitted events with basic information (#2087)
* Expose kbucket range on RoutingUpdated. * Expose inbound request information. * Expose whether routing update is new peer.
This commit is contained in:
@ -98,7 +98,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
// Called when `kademlia` produces an event.
|
||||
fn inject_event(&mut self, message: KademliaEvent) {
|
||||
match message {
|
||||
KademliaEvent::QueryResult { result, .. } => match result {
|
||||
KademliaEvent::OutboundQueryCompleted { result, .. } => match result {
|
||||
QueryResult::GetProviders(Ok(ok)) => {
|
||||
for peer in ok.providers {
|
||||
println!(
|
||||
|
Reference in New Issue
Block a user