mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
bugfixes + tonlib update
This commit is contained in:
parent
2f81361a02
commit
eecf05ca59
35 changed files with 734 additions and 193 deletions
|
@ -289,6 +289,22 @@ void ArchiveManager::get_file(ConstBlockHandle handle, FileReference ref_id, td:
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (handle->handle_moved_to_archive()) {
|
||||
auto f = get_file_desc(handle->id().shard_full(), get_package_id(handle->masterchain_ref_block()), 0, 0, 0, false);
|
||||
if (f) {
|
||||
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this), ref_id, idx = get_max_temp_file_desc_idx(),
|
||||
promise = std::move(promise)](td::Result<td::BufferSlice> R) mutable {
|
||||
if (R.is_ok()) {
|
||||
promise.set_value(R.move_as_ok());
|
||||
} else {
|
||||
td::actor::send_closure(SelfId, &ArchiveManager::get_file_short_cont, ref_id, idx, std::move(promise));
|
||||
}
|
||||
});
|
||||
td::actor::send_closure(f->file_actor_id(), &ArchiveSlice::get_file, std::move(handle), std::move(ref_id),
|
||||
std::move(P));
|
||||
return;
|
||||
}
|
||||
}
|
||||
get_file_short_cont(std::move(ref_id), get_max_temp_file_desc_idx(), std::move(promise));
|
||||
}
|
||||
|
||||
|
@ -806,9 +822,6 @@ PackageId ArchiveManager::get_max_temp_file_desc_idx() {
|
|||
|
||||
PackageId ArchiveManager::get_prev_temp_file_desc_idx(PackageId idx) {
|
||||
auto it = temp_files_.lower_bound(idx);
|
||||
if (it == temp_files_.end()) {
|
||||
return PackageId::empty(false, true);
|
||||
}
|
||||
if (it == temp_files_.begin()) {
|
||||
return PackageId::empty(false, true);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ void BlockArchiver::moved_handle() {
|
|||
td::actor::send_closure(SelfId, &BlockArchiver::got_proof, R.move_as_ok());
|
||||
});
|
||||
|
||||
td::actor::send_closure(archive_, &ArchiveManager::get_temp_file_short, fileref::Proof{handle_->id()}, std::move(P));
|
||||
td::actor::send_closure(archive_, &ArchiveManager::get_file, handle_, fileref::Proof{handle_->id()}, std::move(P));
|
||||
}
|
||||
|
||||
void BlockArchiver::got_proof(td::BufferSlice data) {
|
||||
|
@ -81,7 +81,7 @@ void BlockArchiver::written_proof() {
|
|||
td::actor::send_closure(SelfId, &BlockArchiver::got_proof_link, R.move_as_ok());
|
||||
});
|
||||
|
||||
td::actor::send_closure(archive_, &ArchiveManager::get_temp_file_short, fileref::ProofLink{handle_->id()},
|
||||
td::actor::send_closure(archive_, &ArchiveManager::get_file, handle_, fileref::ProofLink{handle_->id()},
|
||||
std::move(P));
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ void BlockArchiver::written_proof_link() {
|
|||
td::actor::send_closure(SelfId, &BlockArchiver::got_block_data, R.move_as_ok());
|
||||
});
|
||||
|
||||
td::actor::send_closure(archive_, &ArchiveManager::get_temp_file_short, fileref::Block{handle_->id()}, std::move(P));
|
||||
td::actor::send_closure(archive_, &ArchiveManager::get_file, handle_, fileref::Block{handle_->id()}, std::move(P));
|
||||
}
|
||||
|
||||
void BlockArchiver::got_block_data(td::BufferSlice data) {
|
||||
|
|
|
@ -579,7 +579,11 @@ void FullNodeShardImpl::process_broadcast(PublicKeyHash src, ton_api::tonNode_bl
|
|||
|
||||
auto P = td::PromiseCreator::lambda([](td::Result<td::Unit> R) {
|
||||
if (R.is_error()) {
|
||||
LOG(INFO) << "dropped broadcast: " << R.move_as_error();
|
||||
if (R.error().code() == ErrorCode::notready) {
|
||||
LOG(DEBUG) << "dropped broadcast: " << R.move_as_error();
|
||||
} else {
|
||||
LOG(INFO) << "dropped broadcast: " << R.move_as_error();
|
||||
}
|
||||
}
|
||||
});
|
||||
td::actor::send_closure(validator_manager_, &ValidatorManagerInterface::prevalidate_block, std::move(B),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue