mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge branch 'testnet' into block-generation
This commit is contained in:
commit
a2eb3f3631
45 changed files with 1101 additions and 202 deletions
|
@ -1424,6 +1424,8 @@ td::Status ValidatorEngine::load_global_config() {
|
|||
validator_options_.write().set_session_logs_file(session_logs_file_);
|
||||
}
|
||||
validator_options_.write().set_celldb_compress_depth(celldb_compress_depth_);
|
||||
validator_options_.write().set_max_open_archive_files(max_open_archive_files_);
|
||||
validator_options_.write().set_archive_preload_period(archive_preload_period_);
|
||||
|
||||
std::vector<ton::BlockIdExt> h;
|
||||
for (auto &x : conf.validator_->hardforks_) {
|
||||
|
@ -4092,6 +4094,23 @@ int main(int argc, char *argv[]) {
|
|||
});
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_checked_option(
|
||||
'\0', "max-archive-fd", "limit for a number of open file descriptirs in archive manager. 0 is unlimited (default)",
|
||||
[&](td::Slice s) -> td::Status {
|
||||
TRY_RESULT(v, td::to_integer_safe<size_t>(s));
|
||||
acts.push_back([&x, v]() { td::actor::send_closure(x, &ValidatorEngine::set_max_open_archive_files, v); });
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_checked_option(
|
||||
'\0', "archive-preload-period", "open archive slices for the past X second on startup (default: 0)",
|
||||
[&](td::Slice s) -> td::Status {
|
||||
auto v = td::to_double(s);
|
||||
if (v < 0) {
|
||||
return td::Status::Error("sync-before should be non-negative");
|
||||
}
|
||||
acts.push_back([&x, v]() { td::actor::send_closure(x, &ValidatorEngine::set_archive_preload_period, v); });
|
||||
return td::Status::OK();
|
||||
});
|
||||
auto S = p.run(argc, argv);
|
||||
if (S.is_error()) {
|
||||
LOG(ERROR) << "failed to parse options: " << S.move_as_error();
|
||||
|
|
|
@ -218,6 +218,8 @@ class ValidatorEngine : public td::actor::Actor {
|
|||
double archive_ttl_ = 0;
|
||||
double key_proof_ttl_ = 0;
|
||||
td::uint32 celldb_compress_depth_ = 0;
|
||||
size_t max_open_archive_files_ = 0;
|
||||
double archive_preload_period_ = 0.0;
|
||||
bool read_config_ = false;
|
||||
bool started_keyring_ = false;
|
||||
bool started_ = false;
|
||||
|
@ -281,6 +283,12 @@ class ValidatorEngine : public td::actor::Actor {
|
|||
void set_celldb_compress_depth(td::uint32 value) {
|
||||
celldb_compress_depth_ = value;
|
||||
}
|
||||
void set_max_open_archive_files(size_t value) {
|
||||
max_open_archive_files_ = value;
|
||||
}
|
||||
void set_archive_preload_period(double value) {
|
||||
archive_preload_period_ = value;
|
||||
}
|
||||
void set_not_all_shards() {
|
||||
not_all_shards_ = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue