pht: move to std::random_device

This commit is contained in:
Adrien Béraud committed 2023-12-10 16:02:56 -05:00
1 parent 23d07dae38
commit 08d6367fdc
1 file changed
+1 -1
+1 -1
View File
@@ -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));
}