mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add network id to dht (#559)
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
15cdfb0462
commit
3ff50f5f47
15 changed files with 231 additions and 172 deletions
|
@ -132,7 +132,9 @@ class Resolver : public td::actor::Actor {
|
|||
if (!conf.dht_) {
|
||||
return td::Status::Error(ton::ErrorCode::error, "does not contain [dht] section");
|
||||
}
|
||||
auto &nodes = conf.dht_->static_nodes_->nodes_;
|
||||
ton::ton_api::dht_nodes* static_nodes = nullptr;
|
||||
ton::ton_api::downcast_call(*conf.dht_, [&](auto &f) { static_nodes = f.static_nodes_.get(); });
|
||||
auto &nodes = static_nodes->nodes_;
|
||||
if (server_idx_ >= 0) {
|
||||
CHECK(server_idx_ < (int)nodes.size());
|
||||
LOG(INFO) << "Using server #" << server_idx_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue