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.
This commit is contained in:
parent
65d90f585a
commit
64854666f5
1 changed files with 2 additions and 2 deletions
|
@ -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++)
|
||||
|
|
Loading…
Reference in a new issue