From 631940aab228ccca64c15e05d5953f40381a0ffc Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Wed, 27 Mar 2019 11:14:25 -0400 Subject: 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- --- src/qt/test/wallettests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qt/test') diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 9e3518fd53..e1e14e99c0 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -149,7 +149,7 @@ void TestGUI() reserver.reserve(); CWallet::ScanResult result = wallet->ScanForWalletTransactions(locked_chain->getBlockHash(0), {} /* stop_block */, reserver, true /* fUpdate */); QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); - QCOMPARE(result.last_scanned_block, chainActive.Tip()->GetBlockHash()); + QCOMPARE(result.last_scanned_block, ::ChainActive().Tip()->GetBlockHash()); QVERIFY(result.last_failed_block.IsNull()); } wallet->SetBroadcastTransactions(true); -- cgit v1.2.3