Lower request loop min_sleep for tests (#2905)
This commit is contained in:
parent
9cdd7ed911
commit
17d013a932
1 changed files with 1 additions and 1 deletions
|
|
@ -358,7 +358,7 @@ void nano::active_transactions::request_loop ()
|
||||||
|
|
||||||
if (!stopped)
|
if (!stopped)
|
||||||
{
|
{
|
||||||
constexpr auto min_sleep_l = std::chrono::milliseconds (250);
|
const auto min_sleep_l = std::chrono::milliseconds (node.network_params.network.request_interval_ms / 2);
|
||||||
const auto wakeup_l = std::max (stamp_l + std::chrono::milliseconds (node.network_params.network.request_interval_ms), std::chrono::steady_clock::now () + min_sleep_l);
|
const auto wakeup_l = std::max (stamp_l + std::chrono::milliseconds (node.network_params.network.request_interval_ms), std::chrono::steady_clock::now () + min_sleep_l);
|
||||||
condition.wait_until (lock, wakeup_l, [&wakeup_l, &stopped = stopped] { return stopped || std::chrono::steady_clock::now () >= wakeup_l; });
|
condition.wait_until (lock, wakeup_l, [&wakeup_l, &stopped = stopped] { return stopped || std::chrono::steady_clock::now () >= wakeup_l; });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue