Skip to content

Commit 75ff7e6

Browse files
committed
Enable fast-sync overlays by proto_version 5
1 parent ee58f04 commit 75ff7e6

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

validator/full-node.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,11 @@ void FullNodeImpl::on_new_masterchain_block(td::Ref<MasterchainState> state, std
262262
}
263263
}
264264

265+
int proto_version = state->get_consensus_config().proto_version;
266+
use_old_private_overlays_ = (proto_version < 5);
267+
265268
if (!use_old_private_overlays_) {
269+
private_block_overlays_.clear();
266270
std::set<adnl::AdnlNodeIdShort> my_adnl_ids;
267271
my_adnl_ids.insert(adnl_id_);
268272
for (const auto &[adnl_id, _] : local_collator_nodes_) {
@@ -690,14 +694,6 @@ void FullNodeImpl::update_validator_telemetry_collector() {
690694
}
691695

692696
void FullNodeImpl::start_up() {
693-
// TODO: enable fast sync overlays by other means (e.g. some config param)
694-
// TODO: in the future - remove the old private overlay entirely
695-
// This env var is for testing
696-
auto fast_sync_env = getenv("TON_FAST_SYNC_OVERLAYS");
697-
if (fast_sync_env && !strcmp(fast_sync_env, "1")) {
698-
use_old_private_overlays_ = false;
699-
}
700-
701697
update_shard_actor(ShardIdFull{masterchainId}, true);
702698
if (local_id_.is_zero()) {
703699
if (adnl_id_.is_zero()) {

0 commit comments

Comments
 (0)