aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2018-04-23 14:31:47 +0200
committerWladimir J. van der Laan <[email protected]>2018-04-23 14:37:45 +0200
commit4741ca5dc8fd364352ebae3ba9bfb701f1847d26 (patch)
tree10805762aad32df1065ee301081a59200820985e /src/init.cpp
parentMerge #13039: Add logging and error handling for file syncing (diff)
parentConsistently log CValidationState on failure (diff)
downloaddiscoin-4741ca5dc8fd364352ebae3ba9bfb701f1847d26.tar.xz
discoin-4741ca5dc8fd364352ebae3ba9bfb701f1847d26.zip
Merge #13020: Consistently log CValidationState on call failure
e4d0b44 Consistently log CValidationState on failure (Ben Woosley) Pull request description: This replaces potential silent failures and partial logging with full logging. Seems providing at least minimal visibility to the failure is a good practice. E.g. `FlushStateToDisk` can return a rare but meaningful out of disk space error that would be better to note than leave out. Note many of these are related to `ActivateBestChain` or `FlushStateToDisk`. Only a few cases of ignored state remain, e.g. LoadExternalBlockFile and RelayWalletTransaction, where I expect logging would likely be spammy. Tree-SHA512: fb0e521039e5a5250cd9c82e7a8676423b5e3899d495649c0e71752059d1984e5175f556386ade048f51a7d59f5c8e467df7fe91d746076f97d24c000ccf7891
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 8538630d7..f403f90b0 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -684,7 +684,7 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
// scan for better chains in the block chain database, that are not yet connected in the active best chain
CValidationState state;
if (!ActivateBestChain(state, chainparams)) {
- LogPrintf("Failed to connect best block\n");
+ LogPrintf("Failed to connect best block (%s)\n", FormatStateMessage(state));
StartShutdown();
return;
}