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

ErrorCode::notready for "block is not applied": (#594)

This commit is contained in:
Andrey Pfau 2023-02-02 10:04:54 +03:00 committed by GitHub
parent 9ea6b5bf30
commit 426879cd82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -509,7 +509,7 @@ void LiteQuery::get_block_handle_checked(BlockIdExt blkid, td::Promise<ConstBloc
if (handle->is_applied()) { if (handle->is_applied()) {
promise.set_result(std::move(handle)); promise.set_result(std::move(handle));
} else { } else {
promise.set_error(td::Status::Error("block is not applied")); promise.set_error(td::Status::Error(ErrorCode::notready, "block is not applied"));
} }
} }
}); });
@ -1471,7 +1471,7 @@ void LiteQuery::continue_getTransactions(unsigned remaining, bool exact) {
} else { } else {
auto handle = res.move_as_ok(); auto handle = res.move_as_ok();
if (!handle->is_applied()) { if (!handle->is_applied()) {
td::actor::send_closure(Self, &LiteQuery::abort_getTransactions, td::Status::Error("block is not applied"), td::actor::send_closure(Self, &LiteQuery::abort_getTransactions, td::Status::Error(ErrorCode::notready, "block is not applied"),
ton::BlockIdExt{}); ton::BlockIdExt{});
return; return;
} }
@ -1801,7 +1801,7 @@ void LiteQuery::perform_lookupBlock(BlockId blkid, int mode, LogicalTime lt, Uni
} else { } else {
auto handle = res.move_as_ok(); auto handle = res.move_as_ok();
if (!handle->is_applied()) { if (!handle->is_applied()) {
td::actor::send_closure(Self, &LiteQuery::abort_query, td::Status::Error("block is not applied")); td::actor::send_closure(Self, &LiteQuery::abort_query, td::Status::Error(ErrorCode::notready, "block is not applied"));
return; return;
} }
LOG(DEBUG) << "requesting data for block " << handle->id().to_str(); LOG(DEBUG) << "requesting data for block " << handle->id().to_str();