mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Merge branch 'unstable' of https://github.com/sigp/lighthouse into merge-unstable-deneb-aug-24
This commit is contained in:
@@ -647,7 +647,7 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
|
||||
if subnet_queries.len() == MAX_SUBNETS_IN_QUERY || self.queued_queries.is_empty() {
|
||||
// This query is for searching for peers of a particular subnet
|
||||
// Drain subnet_queries so we can re-use it as we continue to process the queue
|
||||
let grouped_queries: Vec<SubnetQuery> = subnet_queries.drain(..).collect();
|
||||
let grouped_queries: Vec<SubnetQuery> = std::mem::take(&mut subnet_queries);
|
||||
self.start_subnet_query(grouped_queries);
|
||||
processed = true;
|
||||
}
|
||||
|
||||
@@ -981,6 +981,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
|
||||
macro_rules! prune_peers {
|
||||
($filter: expr) => {
|
||||
let filter = $filter;
|
||||
for (peer_id, info) in self
|
||||
.network_globals
|
||||
.peers
|
||||
@@ -988,7 +989,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
.worst_connected_peers()
|
||||
.iter()
|
||||
.filter(|(_, info)| {
|
||||
!info.has_future_duty() && !info.is_trusted() && $filter(*info)
|
||||
!info.has_future_duty() && !info.is_trusted() && filter(*info)
|
||||
})
|
||||
{
|
||||
if peers_to_prune.len()
|
||||
|
||||
Reference in New Issue
Block a user