Skip to content

Commit

Permalink
Move low blockrate lt_limits to appropriate place (#828)
Browse files Browse the repository at this point in the history
* Fix setting lt_delta limits

---------

Co-authored-by: SpyCheese <[email protected]>
  • Loading branch information
EmelyanenkoK and SpyCheese authored Dec 13, 2023
1 parent 7a457ca commit 1fc4a0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions validator/impl/collator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,6 @@ bool Collator::unpack_last_mc_state() {
return fatal_error(limits.move_as_error());
}
block_limits_ = limits.move_as_ok();
if (now_ > prev_now_ + 15 && block_limits_->lt_delta.hard() > 200) {
block_limits_->lt_delta = {20, 180, 200};
}
LOG(DEBUG) << "block limits: bytes [" << block_limits_->bytes.underload() << ", " << block_limits_->bytes.soft()
<< ", " << block_limits_->bytes.hard() << "]";
LOG(DEBUG) << "block limits: gas [" << block_limits_->gas.underload() << ", " << block_limits_->gas.soft() << ", "
Expand Down Expand Up @@ -1433,6 +1430,9 @@ bool Collator::check_this_shard_mc_info() {
bool Collator::init_block_limits() {
CHECK(block_limits_);
CHECK(state_usage_tree_);
if (now_ > prev_now_ + 15 && block_limits_->lt_delta.hard() > 200) {
block_limits_->lt_delta = {20, 180, 200};
}
block_limits_->usage_tree = state_usage_tree_.get();
block_limit_status_ = std::make_unique<block::BlockLimitStatus>(*block_limits_);
return true;
Expand Down

0 comments on commit 1fc4a0f

Please sign in to comment.