From 20c2e5a344f7d6ab3f9079b14bb3b659c7d20a17 Mon Sep 17 00:00:00 2001 From: SpyCheese Date: Wed, 26 Jul 2023 16:55:07 +0300 Subject: [PATCH] Fix CE, enable frequent_dht_lookup --- validator/full-node-shard.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/validator/full-node-shard.cpp b/validator/full-node-shard.cpp index a99197546..688ab916f 100644 --- a/validator/full-node-shard.cpp +++ b/validator/full-node-shard.cpp @@ -111,18 +111,14 @@ void FullNodeShardImpl::create_overlay() { private: td::actor::ActorId node_; }; - if (is_active()) { - td::actor::send_closure(overlays_, &overlay::Overlays::create_public_overlay, adnl_id_, overlay_id_full_.clone(), - std::make_unique(actor_id(this)), rules_, - PSTRING() << "{ \"type\": \"shard\", \"shard_id\": " << get_shard() - << ", \"workchain_id\": " << get_workchain() << " }"); - } else { - td::actor::send_closure(overlays_, &overlay::Overlays::create_public_overlay_ex, adnl_id_, overlay_id_full_.clone(), - std::make_unique(actor_id(this)), rules_, - PSTRING() << "{ \"type\": \"shard\", \"shard_id\": " << get_shard() - << ", \"workchain_id\": " << get_workchain() << " }", - false); - } + overlay::OverlayOptions opts; + opts.frequent_dht_lookup_ = true; + opts.announce_self_ = is_active(); + td::actor::send_closure(overlays_, &overlay::Overlays::create_public_overlay_ex, adnl_id_, overlay_id_full_.clone(), + std::make_unique(actor_id(this)), rules_, + PSTRING() << "{ \"type\": \"shard\", \"shard_id\": " << get_shard() + << ", \"workchain_id\": " << get_workchain() << " }", + opts); td::actor::send_closure(rldp_, &rldp::Rldp::add_id, adnl_id_); td::actor::send_closure(rldp2_, &rldp2::Rldp::add_id, adnl_id_);