Don't use active transactions mutex lock during confirmation solicitor.prepare () (#2602)
This commit is contained in:
parent
ad4a4294da
commit
b3d99225f9
1 changed files with 6 additions and 3 deletions
|
@ -277,6 +277,12 @@ void nano::active_transactions::request_confirm (nano::unique_lock<std::mutex> &
|
|||
lock_a.lock ();
|
||||
}
|
||||
}
|
||||
|
||||
// Only representatives ready to receive batched confirm_req
|
||||
lock_a.unlock ();
|
||||
solicitor.prepare (node.rep_crawler.representatives (node.network_params.protocol.tcp_realtime_protocol_version_min));
|
||||
lock_a.lock ();
|
||||
|
||||
auto const now (std::chrono::steady_clock::now ());
|
||||
// Any new election started from process_live only gets requests after at least 1 second
|
||||
auto cutoff_l (now - election_request_delay);
|
||||
|
@ -293,9 +299,6 @@ void nano::active_transactions::request_confirm (nano::unique_lock<std::mutex> &
|
|||
auto & sorted_roots_l = roots.get<tag_difficulty> ();
|
||||
size_t count_l{ 0 };
|
||||
|
||||
// Only representatives ready to receive batched confirm_req
|
||||
solicitor.prepare (node.rep_crawler.representatives (node.network_params.protocol.tcp_realtime_protocol_version_min));
|
||||
|
||||
/*
|
||||
* Loop through active elections in descending order of proof-of-work difficulty, requesting confirmation
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue