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

remove debug checks to improve performance under load on weak validators

This commit is contained in:
ton 2020-04-05 13:56:24 +04:00
parent b73b057e08
commit 7efb345e3d
5 changed files with 138 additions and 4 deletions

View file

@ -1171,6 +1171,15 @@ td::Status ValidatorEngine::load_global_config() {
}
validator_options_ = ton::validator::ValidatorManagerOptions::create(zero_state, init_block);
validator_options_.write().set_shard_check_function(
[](ton::ShardIdFull shard, ton::validator::ValidatorManagerOptions::ShardCheckMode mode) -> bool {
if (mode == ton::validator::ValidatorManagerOptions::ShardCheckMode::m_monitor) {
return true;
}
CHECK(mode == ton::validator::ValidatorManagerOptions::ShardCheckMode::m_validate);
//return shard.is_masterchain();
return true;
});
if (state_ttl_ != 0) {
validator_options_.write().set_state_ttl(state_ttl_);
}