diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-03-02 14:49:11 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-03-02 14:54:47 +0100 |
| commit | 64854666f57d9f94269000f10897858e8c60d99f (patch) | |
| tree | b3457695990e240f065cfbd23c6e35f75e5f3fbb /src/test/test_bitcoin.cpp | |
| parent | Merge #9143: Refactor ZapWalletTxes to avoid layer violations (diff) | |
| download | discoin-64854666f57d9f94269000f10897858e8c60d99f.tar.xz discoin-64854666f57d9f94269000f10897858e8c60d99f.zip | |
test: Report InitBlockIndex result
If InitBlockIndex fails, then it will segfault later. Same for the later
ActivateBestChain. BOOST_REQUIRE the result, so that an error will be
reported and the test case aborted.
Diffstat (limited to 'src/test/test_bitcoin.cpp')
| -rw-r--r-- | src/test/test_bitcoin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 51fc6ae0b..603942448 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -69,11 +69,11 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha pblocktree = new CBlockTreeDB(1 << 20, true); pcoinsdbview = new CCoinsViewDB(1 << 23, true); pcoinsTip = new CCoinsViewCache(pcoinsdbview); - InitBlockIndex(chainparams); + BOOST_REQUIRE(InitBlockIndex(chainparams)); { CValidationState state; bool ok = ActivateBestChain(state, chainparams); - BOOST_CHECK(ok); + BOOST_REQUIRE(ok); } nScriptCheckThreads = 3; for (int i=0; i < nScriptCheckThreads-1; i++) |