mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Ensure m_tip_block is never ZERO
To avoid future code changes from reintroducing the ambiguity fixed by the previous commit, mark m_tip_block private and Assume that it's not set to uint256::ZERO.
This commit is contained in:
parent
e058544d0e
commit
81cea5d4ee
5 changed files with 15 additions and 5 deletions
|
|
@ -975,7 +975,7 @@ public:
|
|||
notifications().m_tip_block_cv.wait_for(lock, timeout, [&]() EXCLUSIVE_LOCKS_REQUIRED(notifications().m_tip_block_mutex) {
|
||||
// We need to wait for m_tip_block to be set AND for the value
|
||||
// to differ from the current_tip value.
|
||||
return (notifications().m_tip_block && notifications().m_tip_block != current_tip) || chainman().m_interrupt;
|
||||
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