mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 15:28:49 +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:
@@ -72,8 +72,8 @@ BOOST_FIXTURE_TEST_CASE(chainstate_update_tip, TestChain100Setup)
|
||||
ChainstateManager& chainman = *Assert(m_node.chainman);
|
||||
const auto get_notify_tip{[&]() {
|
||||
LOCK(m_node.notifications->m_tip_block_mutex);
|
||||
BOOST_REQUIRE(m_node.notifications->m_tip_block);
|
||||
return *m_node.notifications->m_tip_block;
|
||||
BOOST_REQUIRE(m_node.notifications->TipBlock());
|
||||
return *m_node.notifications->TipBlock();
|
||||
}};
|
||||
uint256 curr_tip = get_notify_tip();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user