Skip to content
Snippets Groups Projects
Commit 08d6367f authored by Adrien Béraud's avatar Adrien Béraud
Browse files

pht: move to std::random_device

parent 23d07dae
Branches
Tags
No related merge requests found
...@@ -316,7 +316,7 @@ void Pht::updateCanary(Prefix p) { ...@@ -316,7 +316,7 @@ void Pht::updateCanary(Prefix p) {
dht_->put(p.hash(), std::move(canary_value), dht_->put(p.hash(), std::move(canary_value),
[=](bool){ [=](bool){
static std::bernoulli_distribution d(0.5); static std::bernoulli_distribution d(0.5);
crypto::random_device rd; std::random_device rd;
if (p.size_ and d(rd)) if (p.size_ and d(rd))
updateCanary(p.getPrefix(-1)); updateCanary(p.getPrefix(-1));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment