mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
scripted-diff: replace chainActive -> ::ChainActive()
Though at the moment ChainActive() simply references `g_chainstate.m_chain`,
doing this change now clears the way for multiple chainstate usage and allows
us to script the diff.
-BEGIN VERIFY SCRIPT-
git grep -l "chainActive" | grep -E '(h|cpp)$' | xargs sed -i '/chainActive =/b; /extern CChain& chainActive/b; s/\(::\)\{0,1\}chainActive/::ChainActive()/g'
-END VERIFY SCRIPT-
This commit is contained in:
@@ -90,8 +90,8 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
|
||||
// This test requires that we have a chain with non-zero work.
|
||||
{
|
||||
LOCK(cs_main);
|
||||
BOOST_CHECK(chainActive.Tip() != nullptr);
|
||||
BOOST_CHECK(chainActive.Tip()->nChainWork > 0);
|
||||
BOOST_CHECK(::ChainActive().Tip() != nullptr);
|
||||
BOOST_CHECK(::ChainActive().Tip()->nChainWork > 0);
|
||||
}
|
||||
|
||||
// Test starts here
|
||||
|
||||
Reference in New Issue
Block a user