Skip to content

Commit

Permalink
Lower validator thread priority to normal.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Oct 23, 2024
1 parent ed90b6f commit 4b454dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ BC_PUSH_WARNING(NO_VALUE_OR_CONST_REF_SHARED_PTR)
BC_PUSH_WARNING(SMART_PTR_NOT_NEEDED)
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)

// High thread priority ensures download does not overflow validation backlog.
chaser_validate::chaser_validate(full_node& node) NOEXCEPT
: chaser(node),
initial_subsidy_(node.config().bitcoin.initial_subsidy()),
subsidy_interval_(node.config().bitcoin.subsidy_interval_blocks),
threadpool_(std::max(node.config().node.threads, 1_u32),
network::thread_priority::high)
network::thread_priority::normal)
{
}

Expand Down Expand Up @@ -169,7 +168,7 @@ void chaser_validate::do_bump(height_t) NOEXCEPT

// TODO: make this more flexible/configurable.
// Wait until the gap is filled at a current height.
if (ec == database::error::unassociated || !is_current(link))
if (ec == database::error::unassociated)//// || !is_current(link))
return;

// complete_block always follows and decrements.
Expand Down

0 comments on commit 4b454dc

Please sign in to comment.