mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Update libp2p-kad and libp2p-secio (#1447)
* Update libp2p-kad and libp2p-secio * Fix concern
This commit is contained in:
committed by
Robert Habermeier
parent
c9f047fe84
commit
9018d752dc
@@ -145,9 +145,21 @@ impl<TSubstream> NetworkBehaviourEventProcess<IdentifyEvent> for Behaviour<TSubs
|
||||
}
|
||||
|
||||
impl<TSubstream> NetworkBehaviourEventProcess<KademliaOut> for Behaviour<TSubstream> {
|
||||
fn inject_event(&mut self, _: KademliaOut) {
|
||||
fn inject_event(&mut self, out: KademliaOut) {
|
||||
// We only ever use Kademlia for discovering nodes, and nodes discovered by Kademlia are
|
||||
// automatically added to the topology. Therefore we don't need to do anything.
|
||||
// automatically added to the topology. Therefore we don't need to perform any further
|
||||
// action.
|
||||
match out {
|
||||
KademliaOut::FindNodeResult { key, closer_peers } => {
|
||||
trace!(target: "sub-libp2p", "Kademlia query for {:?} yielded {:?} results",
|
||||
key, closer_peers.len());
|
||||
if closer_peers.is_empty() {
|
||||
warn!(target: "sub-libp2p", "Kademlia random query has yielded empty results");
|
||||
}
|
||||
}
|
||||
// We never start any GET_PROVIDERS query.
|
||||
KademliaOut::GetProvidersResult { .. } => ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user