mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Make m_tip_block an std::optional
This change avoids ambiguity when no tip is connected and it is compared to uint256::ZERO.
This commit is contained in:
parent
b042c4f053
commit
e058544d0e
4 changed files with 7 additions and 4 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.IsNull() || ShutdownRequested(node);
|
||||
return kernel_notifications.m_tip_block || ShutdownRequested(node);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue