mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
pht: move to std::random_device
This commit is contained in:
1 parent
23d07dae38
commit
08d6367fdc
1 file changed
+1
-1
@@ -316,7 +316,7 @@ void Pht::updateCanary(Prefix p) {
|
||||
dht_->put(p.hash(), std::move(canary_value),
|
||||
[=](bool){
|
||||
static std::bernoulli_distribution d(0.5);
|
||||
crypto::random_device rd;
|
||||
std::random_device rd;
|
||||
if (p.size_ and d(rd))
|
||||
updateCanary(p.getPrefix(-1));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user