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

Merge branch 'testnet' into accelerator

This commit is contained in:
SpyCheese 2024-10-21 20:41:09 +03:00
commit 18031ff98f
24 changed files with 454 additions and 131 deletions

View file

@ -839,22 +839,19 @@ void destroy_db(std::string name, td::uint32 attempt, td::Promise<td::Unit> prom
promise.set_value(td::Unit());
return;
}
if (S.is_error() && attempt > 0 && attempt % 64 == 0) {
if (attempt > 0 && attempt % 64 == 0) {
LOG(ERROR) << "failed to destroy index " << name << ": " << S;
} else {
LOG(DEBUG) << "failed to destroy index " << name << ": " << S;
}
delay_action(
[name, attempt, promise = std::move(promise)]() mutable { destroy_db(name, attempt, std::move(promise)); },
[name, attempt, promise = std::move(promise)]() mutable { destroy_db(name, attempt + 1, std::move(promise)); },
td::Timestamp::in(1.0));
}
} // namespace
void ArchiveSlice::destroy(td::Promise<td::Unit> promise) {
before_query();
td::MultiPromise mp;
auto ig = mp.init_guard();
ig.add_promise(std::move(promise));
destroyed_ = true;
for (auto &p : packages_) {
@ -867,10 +864,8 @@ void ArchiveSlice::destroy(td::Promise<td::Unit> promise) {
id_to_package_.clear();
kv_ = nullptr;
PackageId p_id{archive_id_, key_blocks_only_, temp_};
std::string db_path = PSTRING() << db_root_ << p_id.path() << p_id.name() << ".index";
delay_action([name = db_path, attempt = 0,
promise = ig.get_promise()]() mutable { destroy_db(name, attempt, std::move(promise)); },
delay_action([name = db_path_, attempt = 0,
promise = std::move(promise)]() mutable { destroy_db(name, attempt, std::move(promise)); },
td::Timestamp::in(0.0));
}

View file

@ -4652,7 +4652,7 @@ bool Collator::create_mc_state_extra() {
cc_updated = true;
LOG(INFO) << "increased masterchain catchain seqno to " << val_info.catchain_seqno;
}
auto nodes = block::Config::do_compute_validator_set(ccvc, shard_, *cur_validators, now_, val_info.catchain_seqno);
auto nodes = block::Config::do_compute_validator_set(ccvc, shard_, *cur_validators, val_info.catchain_seqno);
LOG_CHECK(!nodes.empty()) << "validator node list in unpacked validator set is empty";
auto vlist_hash = block::compute_validator_set_hash(/* val_info.catchain_seqno */ 0, shard_, std::move(nodes));