aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-03-27 12:17:06 -0700
committerAlexander Blair <snipa@jagtech.io>2020-03-27 12:17:07 -0700
commit3baa68bbaba225984d97fe98a7863da8932a1f56 (patch)
treedd21a4a9f478f86890d5d7371d7b0515c2baf8a8 /src/p2p
parentMerge pull request #6275 (diff)
parentp2p: fix adding wrong indices to the filtered peer list (diff)
downloadmonero-3baa68bbaba225984d97fe98a7863da8932a1f56.tar.xz
Merge pull request #6279
36bdf402 p2p: fix adding wrong indices to the filtered peer list (moneromooo-monero)
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 3db4e7b83..3f7edf9b1 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1424,10 +1424,10 @@ namespace nodetool
std::deque<size_t> filtered;
const size_t limit = use_white_list ? 20 : std::numeric_limits<size_t>::max();
- size_t idx = 0, skipped = 0;
for (int step = 0; step < 2; ++step)
{
bool skip_duplicate_class_B = step == 0;
+ size_t idx = 0, skipped = 0;
zone.m_peerlist.foreach (use_white_list, [&classB, &filtered, &idx, &skipped, skip_duplicate_class_B, limit, next_needed_pruning_stripe](const peerlist_entry &pe){
if (filtered.size() >= limit)
return false;