aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-01-03 17:56:21 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-01-03 17:56:54 +0000
commit36bdf40288825f18ab779dd711fc364a71c4c168 (patch)
treecd6db46c171ea699831603079e02b1ea50d75e45 /src/p2p/net_node.inl
parentMerge pull request #6232 (diff)
downloadmonero-36bdf40288825f18ab779dd711fc364a71c4c168.tar.xz
p2p: fix adding wrong indices to the filtered peer list
Diffstat (limited to 'src/p2p/net_node.inl')
-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 45bb10593..a697e2e44 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1432,10 +1432,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;