@@ -321,14 +321,15 @@ void ValidatorManagerImpl::dec_pending_new_blocks() {
321321}
322322
323323void ValidatorManagerImpl::wait_block_state (BlockHandle handle, td::uint32 priority, td::Timestamp timeout,
324- td::Promise<td::Ref<ShardState>> promise) {
324+ bool wait_store, td::Promise<td::Ref<ShardState>> promise) {
325325 auto it = wait_state_.find (handle->id ());
326326 if (it == wait_state_.end ()) {
327327 auto P = td::PromiseCreator::lambda ([SelfId = actor_id (this ), handle](td::Result<td::Ref<ShardState>> R) {
328328 td::actor::send_closure (SelfId, &ValidatorManagerImpl::finished_wait_state, handle->id (), std::move (R));
329329 });
330330 auto id = td::actor::create_actor<WaitBlockState>(" waitstate" , handle, 0 , opts_, last_masterchain_state_,
331- actor_id (this ), td::Timestamp::in (10.0 ), std::move (P))
331+ actor_id (this ), td::Timestamp::in (10.0 ),
332+ td::Promise<td::Ref<ShardState>>{}, std::move (P))
332333 .release ();
333334 wait_state_[handle->id ()].actor_ = id;
334335 it = wait_state_.find (handle->id ());
@@ -340,14 +341,14 @@ void ValidatorManagerImpl::wait_block_state(BlockHandle handle, td::uint32 prior
340341}
341342
342343void ValidatorManagerImpl::wait_block_state_short (BlockIdExt block_id, td::uint32 priority, td::Timestamp timeout,
343- td::Promise<td::Ref<ShardState>> promise) {
344+ bool wait_store, td::Promise<td::Ref<ShardState>> promise) {
344345 auto P = td::PromiseCreator::lambda (
345- [SelfId = actor_id (this ), timeout , promise = std::move (promise)](td::Result<BlockHandle> R) mutable {
346+ [=, SelfId = actor_id (this ), promise = std::move (promise)](td::Result<BlockHandle> R) mutable {
346347 if (R.is_error ()) {
347348 promise.set_error (R.move_as_error ());
348349 return ;
349350 }
350- td::actor::send_closure (SelfId, &ValidatorManagerImpl::wait_block_state, R.move_as_ok (), 0 , timeout,
351+ td::actor::send_closure (SelfId, &ValidatorManagerImpl::wait_block_state, R.move_as_ok (), 0 , timeout, wait_store,
351352 std::move (promise));
352353 });
353354 get_block_handle (block_id, true , std::move (P));
@@ -401,7 +402,7 @@ void ValidatorManagerImpl::wait_prev_block_state(BlockHandle handle, td::uint32
401402 auto shard = handle->id ().shard_full ();
402403 auto prev_shard = handle->one_prev (true ).shard_full ();
403404 if (shard == prev_shard) {
404- wait_block_state_short (handle->one_prev (true ), 0 , timeout, std::move (promise));
405+ wait_block_state_short (handle->one_prev (true ), 0 , timeout, true , std::move (promise));
405406 } else {
406407 CHECK (shard_parent (shard) == prev_shard);
407408 bool left = shard_child (prev_shard, true ) == shard;
@@ -420,7 +421,7 @@ void ValidatorManagerImpl::wait_prev_block_state(BlockHandle handle, td::uint32
420421 }
421422 }
422423 });
423- wait_block_state_short (handle->one_prev (true ), 0 , timeout, std::move (P));
424+ wait_block_state_short (handle->one_prev (true ), 0 , timeout, true , std::move (P));
424425 }
425426 } else {
426427 wait_block_state_merge (handle->one_prev (true ), handle->one_prev (false ), 0 , timeout, std::move (promise));
@@ -495,7 +496,7 @@ void ValidatorManagerImpl::wait_block_message_queue(BlockHandle handle, td::uint
495496 }
496497 });
497498
498- wait_block_state (handle, 0 , timeout, std::move (P));
499+ wait_block_state (handle, 0 , timeout, true , std::move (P));
499500}
500501
501502void ValidatorManagerImpl::wait_block_message_queue_short (BlockIdExt block_id, td::uint32 priority,
0 commit comments