Use a signal to continue init after genesis activation

Github-Pull: #8392
Rebased-From: 0fd2a33648
This commit is contained in:
Pieter Wuille
2016-07-22 15:57:25 +02:00
committed by Luke Dashjr
parent 9b0097976f
commit 30eac2d79a
3 changed files with 35 additions and 12 deletions

View File

@@ -4339,8 +4339,6 @@ bool InitBlockIndex(const CChainParams& chainparams)
CBlockIndex *pindex = AddToBlockIndex(block);
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
return error("LoadBlockIndex(): genesis block not accepted");
if (!ActivateBestChain(state, chainparams, &block))
return error("LoadBlockIndex(): genesis block cannot be activated");
// Force a chainstate write so that when we VerifyDB in a moment, it doesn't check stale data
return FlushStateToDisk(state, FLUSH_STATE_ALWAYS);
} catch (const std::runtime_error& e) {