Skip to content

Commit

Permalink
Init on one server ready
Browse files Browse the repository at this point in the history
  • Loading branch information
tvorogme committed Sep 13, 2024
1 parent f272741 commit 1e346b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lite-server-daemon/adnl-lite-proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ namespace ton::liteserver {

void server_update_time(adnl::AdnlNodeIdShort server, std::tuple<ton::UnixTime, ton::BlockSeqno> time,
bool update = true) {
if (!inited) {
inited = true;
}

if (update) {
to_update--;
}
Expand Down Expand Up @@ -908,8 +912,8 @@ namespace ton::liteserver {
"cannot load block", "seqno not in db", "block not found"}) {
if (error->message_.find(substring) != std::string::npos) {
if (refire + 1 > allowed_refire) {
LOG(ERROR) << "Too deep refire for cannot load block";
// auto res = create_serialize_tl_object<lite_api::liteServer_error>(228, "Too deep refire");
LOG(ERROR) << "Too deep refire";
auto res = create_serialize_tl_object<lite_api::liteServer_error>(228, "Too deep refire");
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
promise.set_value(std::move(res));
return;
Expand Down Expand Up @@ -1564,10 +1568,6 @@ namespace ton::liteserver {

td::actor::send_closure(s.second, &LiteServerClient::get_max_time, std::move(P));
}

if (!inited) {
inited = true;
}
}

void add_ext_server_id(adnl::AdnlNodeIdShort id) {
Expand Down

0 comments on commit 1e346b0

Please sign in to comment.