Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dungeon-master-666 committed Jan 15, 2024
1 parent 48b2993 commit 9f5466a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions validator/impl/liteserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ void LiteQuery::get_block_handle_checked(BlockIdExt blkid, td::Promise<ConstBloc
if (handle->is_applied()) {
promise.set_result(std::move(handle));
} else {
LOG(ERROR) << "cannot get block handle for " << handle->id().to_str() << " : block is not applied";
promise.set_error(td::Status::Error(ErrorCode::notready, "block is not applied"));
}
}
Expand Down Expand Up @@ -1593,6 +1594,7 @@ void LiteQuery::continue_getTransactions(unsigned remaining, bool exact) {
} else {
auto handle = res.move_as_ok();
if (!handle->is_applied()) {
LOG(ERROR) << "cannot get block handle for " << handle->id().to_str() << " : block is not applied";
td::actor::send_closure(Self, &LiteQuery::abort_getTransactions, td::Status::Error(ErrorCode::notready, "block is not applied"),
ton::BlockIdExt{});
return;
Expand Down Expand Up @@ -1947,6 +1949,7 @@ void LiteQuery::perform_lookupBlockWithProof(BlockId blkid, BlockIdExt mc_blkid,
} else {
auto handle = res.move_as_ok();
if (!handle->is_applied()) {
LOG(ERROR) << "cannot get block handle for " << handle->id().to_str() << " : block is not applied";
td::actor::send_closure(Self, &LiteQuery::abort_query, td::Status::Error(ErrorCode::notready, "block is not applied"));
return;
}
Expand Down Expand Up @@ -2223,6 +2226,7 @@ void LiteQuery::perform_lookupBlock(BlockId blkid, int mode, LogicalTime lt, Uni
} else {
auto handle = res.move_as_ok();
if (!handle->is_applied()) {
LOG(ERROR) << "cannot get block handle for " << handle->id().to_str() << " : block is not applied";
td::actor::send_closure(Self, &LiteQuery::abort_query, td::Status::Error(ErrorCode::notready, "block is not applied"));
return;
}
Expand Down

0 comments on commit 9f5466a

Please sign in to comment.