mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
p2p: fix adding wrong indices to the filtered peer list
This commit is contained in:
parent
907292dfb4
commit
36bdf40288
@ -1432,10 +1432,10 @@ namespace nodetool
|
|||||||
|
|
||||||
std::deque<size_t> filtered;
|
std::deque<size_t> filtered;
|
||||||
const size_t limit = use_white_list ? 20 : std::numeric_limits<size_t>::max();
|
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)
|
for (int step = 0; step < 2; ++step)
|
||||||
{
|
{
|
||||||
bool skip_duplicate_class_B = step == 0;
|
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){
|
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)
|
if (filtered.size() >= limit)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user