fn start_query(&mut self, query: QueryType, target_peers: usize) {
        // Generate a random target node id.
        let random_node = NodeId::random();

        // Build the future
        let query_future = self
            .discv5
            .find_node(random_node)
            .map(|v| QueryResult(query, v));

        // Add the future to active queries, to be executed.
        self.active_queries.push(Box::pin(query_future));
    }
/// Search for a specified number of new peers using the underlying discovery mechanism.
///
/// This can optionally search for peers for a given predicate. Regardless of the predicate
/// given, this will only search for peers on the same enr_fork_id as specified in the local
/// ENR.
Search for a specified number of new peers using the underlying discovery mechanism.
This can optionally search for peers for a given predicate. Regardless of the predicate
given, this will only search for peers on the same enr_fork_id as specified in the local
ENR.
Search for a specified number of new peers using the underlying discovery mechanism . This can optionally search for peers for a given predicate . Regardless of the predicate given this will only search for peers on the same enr_fork_id as specified in the local ENR .
fn start_query(&mut self, query: QueryType, target_peers: usize) {
        // Generate a random target node id.
        let random_node = NodeId::random();
        // Build the future
        let query_future = self
            .discv5
            .find_node(random_node)
            .map(|v| QueryResult(query, v));
        // Add the future to active queries, to be executed.
        self.active_queries.push(Box::pin(query_future));
    }
fn start_query ( & mut self , query : QueryType , target_peers : usize ) { // Generate a random target node id. let random_node = NodeId :: random ( ) ; // Build the future let query_future = self . discv5 . find_node ( random_node ) . map ( | v | QueryResult ( query , v ) ) ; // Add the future to active queries, to be executed. self . active_queries . push ( Box :: pin ( query_future ) ) ; }
Search for a specified number of new peers using the underlying discovery mechanism.
Search for a specified number of new peers using the underlying discovery mechanism .
&mut self
query
QueryType
target_peers
usize
&mut self
query
QueryType
target_peers
usize