1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Minor DHT improvements (#657)

* Remove repeating DHT queries in adnl-peer

* Fix checking dht node signature for non-default network id

* Custom dht network id in generate-random-id
This commit is contained in:
SpyCheese 2023-03-30 07:10:09 +00:00 committed by GitHub
parent 5e0dadfff6
commit 3a30d6f319
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 20 deletions

View file

@ -944,7 +944,6 @@ void AdnlPeerPairImpl::got_data_from_dht(td::Result<AdnlNode> R) {
CHECK(dht_query_active_);
dht_query_active_ = false;
next_dht_query_at_ = td::Timestamp::in(td::Random::fast(60.0, 120.0));
alarm_timestamp().relax(next_dht_query_at_);
if (R.is_error()) {
VLOG(ADNL_INFO) << this << ": dht query failed: " << R.move_as_error();
return;