mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 5bbbc0d0ee into merged_master (Bitcoin PR bitcoin/bitcoin#31325)
This commit is contained in:
commit
5ddaed6129
5 changed files with 17 additions and 4 deletions
|
|
@ -989,7 +989,9 @@ public:
|
|||
{
|
||||
WAIT_LOCK(notifications().m_tip_block_mutex, lock);
|
||||
notifications().m_tip_block_cv.wait_for(lock, timeout, [&]() EXCLUSIVE_LOCKS_REQUIRED(notifications().m_tip_block_mutex) {
|
||||
return (notifications().m_tip_block != current_tip && notifications().m_tip_block != uint256::ZERO) || chainman().m_interrupt;
|
||||
// We need to wait for m_tip_block to be set AND for the value
|
||||
// to differ from the current_tip value.
|
||||
return (notifications().TipBlock() && notifications().TipBlock() != current_tip) || chainman().m_interrupt;
|
||||
});
|
||||
}
|
||||
// Must release m_tip_block_mutex before locking cs_main, to avoid deadlocks.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue