mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
Merge pull request #1582 from majestrate/issue-1562-2021-03-18
fix issue #1562
This commit is contained in:
commit
a9d2349a12
@ -270,8 +270,7 @@ namespace llarp
|
|||||||
|
|
||||||
if (lookupRouters.size() > LookupPerTick)
|
if (lookupRouters.size() > LookupPerTick)
|
||||||
{
|
{
|
||||||
static std::mt19937_64 rng{llarp::randint()};
|
std::shuffle(lookupRouters.begin(), lookupRouters.end(), CSRNG{});
|
||||||
std::shuffle(lookupRouters.begin(), lookupRouters.end(), rng);
|
|
||||||
lookupRouters.resize(LookupPerTick);
|
lookupRouters.resize(LookupPerTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,9 +410,7 @@ namespace llarp
|
|||||||
std::vector<Introduction> intros = currentIntroSet.I;
|
std::vector<Introduction> intros = currentIntroSet.I;
|
||||||
if (intros.size() > 1)
|
if (intros.size() > 1)
|
||||||
{
|
{
|
||||||
std::random_device rd;
|
std::shuffle(intros.begin(), intros.end(), CSRNG{});
|
||||||
std::mt19937 g(rd());
|
|
||||||
std::shuffle(intros.begin(), intros.end(), g);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// to find a intro on the same router as before that is newer
|
// to find a intro on the same router as before that is newer
|
||||||
|
Loading…
Reference in New Issue
Block a user