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

Use state with applied shards in liteserver (#553)

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2022-12-13 17:46:54 +03:00 committed by GitHub
parent 6f63be6140
commit 1b106ef270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 59 additions and 18 deletions

View file

@ -107,9 +107,6 @@ void ShardClient::start_up_init_mode() {
void ShardClient::applied_all_shards() {
LOG(DEBUG) << "shardclient: " << masterchain_block_handle_->id() << " finished";
masterchain_state_.clear();
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<td::Unit> R) {
R.ensure();
td::actor::send_closure(SelfId, &ShardClient::saved_to_db);
@ -121,7 +118,8 @@ void ShardClient::applied_all_shards() {
void ShardClient::saved_to_db() {
CHECK(masterchain_block_handle_);
td::actor::send_closure(manager_, &ValidatorManager::update_shard_client_block_handle, masterchain_block_handle_,
[](td::Unit) {});
std::move(masterchain_state_), [](td::Unit) {});
masterchain_state_.clear();
if (promise_) {
promise_.set_value(td::Unit());
}