aboutsummaryrefslogtreecommitdiff
path: root/src/test/blockfilter_index_tests.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-03-27 11:14:25 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2019-05-03 15:02:54 -0400
commit631940aab228ccca64c15e05d5953f40381a0ffc (patch)
tree694cfe15bf0a6d9271fc9b6c10fda5a77c935580 /src/test/blockfilter_index_tests.cpp
parenta3a609079c76dd2bbc72127488bf466cc61d8940 (diff)
downloadbitcoin-631940aab228ccca64c15e05d5953f40381a0ffc.tar.xz
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-
Diffstat (limited to 'src/test/blockfilter_index_tests.cpp')
-rw-r--r--src/test/blockfilter_index_tests.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/blockfilter_index_tests.cpp b/src/test/blockfilter_index_tests.cpp
index db0b973463..a720d07e1c 100644
--- a/src/test/blockfilter_index_tests.cpp
+++ b/src/test/blockfilter_index_tests.cpp
@@ -125,9 +125,9 @@ BOOST_FIXTURE_TEST_CASE(blockfilter_index_initial_sync, TestChain100Setup)
std::vector<BlockFilter> filters;
std::vector<uint256> filter_hashes;
- for (const CBlockIndex* block_index = chainActive.Genesis();
+ for (const CBlockIndex* block_index = ::ChainActive().Genesis();
block_index != nullptr;
- block_index = chainActive.Next(block_index)) {
+ block_index = ::ChainActive().Next(block_index)) {
BOOST_CHECK(!filter_index.LookupFilter(block_index, filter));
BOOST_CHECK(!filter_index.LookupFilterHeader(block_index, filter_header));
BOOST_CHECK(!filter_index.LookupFilterRange(block_index->nHeight, block_index, filters));
@@ -153,9 +153,9 @@ BOOST_FIXTURE_TEST_CASE(blockfilter_index_initial_sync, TestChain100Setup)
{
LOCK(cs_main);
const CBlockIndex* block_index;
- for (block_index = chainActive.Genesis();
+ for (block_index = ::ChainActive().Genesis();
block_index != nullptr;
- block_index = chainActive.Next(block_index)) {
+ block_index = ::ChainActive().Next(block_index)) {
CheckFilterLookups(filter_index, block_index, last_header);
}
}
@@ -164,7 +164,7 @@ BOOST_FIXTURE_TEST_CASE(blockfilter_index_initial_sync, TestChain100Setup)
const CBlockIndex* tip;
{
LOCK(cs_main);
- tip = chainActive.Tip();
+ tip = ::ChainActive().Tip();
}
CScript coinbase_script_pub_key = GetScriptForDestination(coinbaseKey.GetPubKey().GetID());
std::vector<std::shared_ptr<CBlock>> chainA, chainB;
@@ -250,7 +250,7 @@ BOOST_FIXTURE_TEST_CASE(blockfilter_index_initial_sync, TestChain100Setup)
{
LOCK(cs_main);
- tip = chainActive.Tip();
+ tip = ::ChainActive().Tip();
}
BOOST_CHECK(filter_index.LookupFilterRange(0, tip, filters));
BOOST_CHECK(filter_index.LookupFilterHashRange(0, tip, filter_hashes));