mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
*: Update to libp2p v0.21.1 (#6559)
* *Cargo.toml: Update versions * client/network/src/discovery: Adjust to Kademlia API changes * client/network: Adjust to one_shot.rs changes * client/network/discovery: Log address list on trace level * client/network/discovery: Ignore RoutablePeer and PendingRoutablePeer * Commit Cargo.lock * Finish update Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
@@ -29,7 +29,13 @@ use libp2p::swarm::{NetworkBehaviourAction, NetworkBehaviourEventProcess, PollPa
|
||||
use log::debug;
|
||||
use sp_consensus::{BlockOrigin, import_queue::{IncomingBlock, Origin}};
|
||||
use sp_runtime::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId, Justification};
|
||||
use std::{borrow::Cow, collections::VecDeque, iter, task::{Context, Poll}, time::Duration};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{HashSet, VecDeque},
|
||||
iter,
|
||||
task::{Context, Poll},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
/// General behaviour of the network. Combines all protocols together.
|
||||
#[derive(NetworkBehaviour)]
|
||||
@@ -124,7 +130,7 @@ impl<B: BlockT, H: ExHashT> Behaviour<B, H> {
|
||||
}
|
||||
|
||||
/// Returns the list of nodes that we know exist in the network.
|
||||
pub fn known_peers(&mut self) -> impl Iterator<Item = &PeerId> {
|
||||
pub fn known_peers(&mut self) -> HashSet<PeerId> {
|
||||
self.discovery.known_peers()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user