diff options
| author | James O'Beirne <[email protected]> | 2019-07-24 11:45:04 -0400 |
|---|---|---|
| committer | James O'Beirne <[email protected]> | 2019-08-06 13:13:06 -0400 |
| commit | fae6ab6aed3b9fdc9201bb19a307dfc3d9b89891 (patch) | |
| tree | 32136f410bdb26e8c414caddf9e3c86dbf45a8db /src/test/miner_tests.cpp | |
| parent | Merge #16554: test: only include and use OpenSSL where it's actually needed (... (diff) | |
| download | discoin-fae6ab6aed3b9fdc9201bb19a307dfc3d9b89891.tar.xz discoin-fae6ab6aed3b9fdc9201bb19a307dfc3d9b89891.zip | |
refactor: pcoinsTip -> CChainState::CoinsTip()
This aliasing makes subsequent commits easier to review; eventually CoinsTip()
will return the CCoinsViewCache managed by CChainState.
Diffstat (limited to 'src/test/miner_tests.cpp')
| -rw-r--r-- | src/test/miner_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 05d7f7698..c9661b730 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -372,7 +372,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) CBlockIndex* prev = ::ChainActive().Tip(); CBlockIndex* next = new CBlockIndex(); next->phashBlock = new uint256(InsecureRand256()); - pcoinsTip->SetBestBlock(next->GetBlockHash()); + ::ChainstateActive().CoinsTip().SetBestBlock(next->GetBlockHash()); next->pprev = prev; next->nHeight = prev->nHeight + 1; next->BuildSkip(); @@ -384,7 +384,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) CBlockIndex* prev = ::ChainActive().Tip(); CBlockIndex* next = new CBlockIndex(); next->phashBlock = new uint256(InsecureRand256()); - pcoinsTip->SetBestBlock(next->GetBlockHash()); + ::ChainstateActive().CoinsTip().SetBestBlock(next->GetBlockHash()); next->pprev = prev; next->nHeight = prev->nHeight + 1; next->BuildSkip(); @@ -414,7 +414,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) while (::ChainActive().Tip()->nHeight > nHeight) { CBlockIndex* del = ::ChainActive().Tip(); ::ChainActive().SetTip(del->pprev); - pcoinsTip->SetBestBlock(del->pprev->GetBlockHash()); + ::ChainstateActive().CoinsTip().SetBestBlock(del->pprev->GetBlockHash()); delete del->phashBlock; delete del; } |