mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +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
|
|
@ -1807,7 +1807,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
{
|
||||
WAIT_LOCK(kernel_notifications.m_tip_block_mutex, lock);
|
||||
kernel_notifications.m_tip_block_cv.wait(lock, [&]() EXCLUSIVE_LOCKS_REQUIRED(kernel_notifications.m_tip_block_mutex) {
|
||||
return kernel_notifications.m_tip_block || ShutdownRequested(node);
|
||||
return kernel_notifications.TipBlock() || ShutdownRequested(node);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue