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

Patch tonlib and validator-engine (#1417)

* Don't enable fast state serializer automatically

* Fix checking masterchain proof in tonlib lookupBlock
This commit is contained in:
SpyCheese 2024-12-05 18:50:12 +03:00 committed by GitHub
parent 7bc50e63d7
commit 645d26a1f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 29 deletions

View file

@ -1503,17 +1503,6 @@ td::Status ValidatorEngine::load_global_config() {
h.push_back(b);
}
validator_options_.write().set_hardforks(std::move(h));
auto r_total_mem_stat = td::get_total_mem_stat();
if (r_total_mem_stat.is_error()) {
LOG(ERROR) << "Failed to get total RAM size: " << r_total_mem_stat.move_as_error();
} else {
td::uint64 total_ram = r_total_mem_stat.ok().total_ram;
LOG(WARNING) << "Total RAM = " << td::format::as_size(total_ram);
if (total_ram >= (90ULL << 30)) {
fast_state_serializer_enabled_ = true;
}
}
validator_options_.write().set_fast_state_serializer_enabled(fast_state_serializer_enabled_);
return td::Status::OK();
@ -4553,7 +4542,7 @@ int main(int argc, char *argv[]) {
});
p.add_option(
'\0', "fast-state-serializer",
"faster persistent state serializer, but requires more RAM (enabled automatically on machines with >= 90GB RAM)",
"faster persistent state serializer, but requires more RAM",
[&]() {
acts.push_back(
[&x]() { td::actor::send_closure(x, &ValidatorEngine::set_fast_state_serializer_enabled, true); });