aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-03-05 16:08:10 -0500
committerJonas Schnelli <dev@jonasschnelli.ch>2016-03-14 09:33:27 +0100
commit15e6e13624e3bd322db67861ec27bd5f9d18b6e8 (patch)
tree88eeca02bb7bd30ded80cc7b70352f67016ab83c /src/init.cpp
parentfc7c60d6998a330966ffe99274c93b5278ed2ee1 (diff)
[Wallet] optimize return value of InitLoadWallet()
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 0fd8de08c4..ba98600141 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1427,12 +1427,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
std::string warningString;
std::string errorString;
pwalletMain = CWallet::InitLoadWallet(fDisableWallet, strWalletFile, warningString, errorString);
- if (!pwalletMain)
- return false;
if (!warningString.empty())
InitWarning(warningString);
if (!errorString.empty())
+ {
+ LogPrintf("%s", errorString);
return InitError(errorString);
+ }
+ if (!pwalletMain)
+ return false;
}
#else // ENABLE_WALLET
LogPrintf("No wallet support compiled in!\n");