Browse Source

don't sample too small list of eligible introducers

pull/2105/head
orignal 2 months ago
parent
commit
1a6109109a
  1. 3
      libi2pd/SSU2.cpp

3
libi2pd/SSU2.cpp

@ -1240,6 +1240,9 @@ namespace transport @@ -1240,6 +1240,9 @@ namespace transport
eligible.push_back (s.second);
}
if (eligible.size () <= (size_t)maxNumIntroducers)
return eligible;
else
std::sample (eligible.begin(), eligible.end(), std::back_inserter(ret), maxNumIntroducers, m_Rng);
return ret;
}

Loading…
Cancel
Save