Skip to content

Commit

Permalink
Optional TON_FASTER_CC_BLOCKS
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese committed Sep 15, 2023
1 parent 257a67e commit ed5aca1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion validator-session/validator-session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "td/utils/crypto.h"
#include "ton/ton-tl.hpp"
#include "candidate-serializer.h"
#include <cstdlib>

namespace ton {

Expand Down Expand Up @@ -746,7 +747,15 @@ void ValidatorSessionImpl::request_new_block(bool now) {
return;
}
requested_new_block_ = true;
if (now) {
static bool faster_cc_blocks = []() -> bool{
const char* env = getenv("TON_FASTER_CC_BLOCKS");
bool x = env && !strcmp(env, "1");
if (x) {
LOG(ERROR) << "Enabled TON_FASTER_CC_BLOCKS";
}
return x;
}();
if (now || faster_cc_blocks) {
requested_new_block_now_ = true;
td::actor::send_closure(catchain_, &catchain::CatChain::need_new_block, td::Timestamp::now());
} else {
Expand Down

0 comments on commit ed5aca1

Please sign in to comment.