mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Don't check external messages if out of sync
This commit is contained in:
parent
9d94e04d20
commit
aca51a8dae
1 changed files with 4 additions and 0 deletions
|
@ -430,6 +430,10 @@ void ValidatorManagerImpl::add_external_message(td::Ref<ExtMessage> msg, int pri
|
||||||
ext_messages_hashes_[id.hash] = {priority, id};
|
ext_messages_hashes_[id.hash] = {priority, id};
|
||||||
}
|
}
|
||||||
void ValidatorManagerImpl::check_external_message(td::BufferSlice data, td::Promise<td::Ref<ExtMessage>> promise) {
|
void ValidatorManagerImpl::check_external_message(td::BufferSlice data, td::Promise<td::Ref<ExtMessage>> promise) {
|
||||||
|
if (!started_) {
|
||||||
|
promise.set_error(td::Status::Error(ErrorCode::notready, "node not synced"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto state = do_get_last_liteserver_state();
|
auto state = do_get_last_liteserver_state();
|
||||||
if (state.is_null()) {
|
if (state.is_null()) {
|
||||||
promise.set_error(td::Status::Error(ErrorCode::notready, "not ready"));
|
promise.set_error(td::Status::Error(ErrorCode::notready, "not ready"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue