aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-07-06 20:00:11 -0400
committerMatt Corallo <git@bluematt.me>2017-07-27 15:03:05 -0400
commitb0f32497b873cd1eaf0be86f8e265355aa86174f (patch)
tree4f9c82cd3d5f51e5236254cdc874279391e75034 /src/validation.h
parenteda888e57352037ab2e60f6ef90098b3ce23a157 (diff)
downloadbitcoin-b0f32497b873cd1eaf0be86f8e265355aa86174f.tar.xz
More user-friendly error message if UTXO DB runs ahead of block DB
This gives LoadChainTip a return value - allowing it to indicate that the UTXO DB ran ahead of the block DB. This just provides a nicer error message instead of the previous mysterious assert(!setBlockIndexCandidates.empty()) error. This also calls ActivateBestChain in case we just loaded the genesis block in LoadChainTip, avoiding relying on the ActivateBestChain in ThreadImport before continuing init process.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h
index 3ce5023f0a..b1d482cbfb 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -262,7 +262,7 @@ bool LoadGenesisBlock(const CChainParams& chainparams);
* initializing state if we're running with -reindex. */
bool LoadBlockIndex(const CChainParams& chainparams);
/** Update the chain tip based on database information. */
-void LoadChainTip(const CChainParams& chainparams);
+bool LoadChainTip(const CChainParams& chainparams);
/** Unload database information */
void UnloadBlockIndex();
/** Run an instance of the script checking thread */