p2p: remove blocked addresses/hosts from peerlist
This commit is contained in:
@@ -289,17 +289,9 @@ namespace nodetool
|
||||
copy_peers(peers.anchor, m_peers_anchor.get<by_addr>());
|
||||
}
|
||||
|
||||
void peerlist_manager::evict_host_from_white_peerlist(const peerlist_entry& pr)
|
||||
void peerlist_manager::evict_host_from_peerlist(bool use_white, const peerlist_entry& pr)
|
||||
{
|
||||
peers_indexed::index<by_time>::type& sorted_index=m_peers_white.get<by_time>();
|
||||
auto i = sorted_index.begin();
|
||||
while (i != sorted_index.end())
|
||||
{
|
||||
if (i->adr.is_same_host(pr.adr))
|
||||
i = sorted_index.erase(i);
|
||||
else
|
||||
++i;
|
||||
}
|
||||
filter(use_white, [&pr](const peerlist_entry& pe){ return pe.adr.is_same_host(pr.adr); });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user