aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-11-11 16:20:44 -0500
committerCarl Dong <contact@carldong.me>2021-12-06 15:56:55 -0500
commit975235ca0a8f5bcf9df880698b3b0d4bbde9f7fb (patch)
tree4193817014de87e70db3c716f4f91467f7d08eb0 /src/init.cpp
parent8715658983a0a07c56513acd8ded8dfc59c5c169 (diff)
Move init logistics message for BAD_GENESIS_BLOCK to init.cpp
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 6ed382a00c..0db5464fbc 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1436,6 +1436,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
strLoadError = _("Error loading block database");
break;
case ChainstateLoadingError::ERROR_BAD_GENESIS_BLOCK:
+ // If the loaded chain has a wrong genesis, bail out immediately
+ // (we're likely using a testnet datadir, or the other way around).
return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?"));
case ChainstateLoadingError::ERROR_PRUNED_NEEDS_REINDEX:
strLoadError = _("You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain");