aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2013-05-03 14:33:02 -0700
committerGavin Andresen <[email protected]>2013-05-03 14:33:02 -0700
commit61a845dcb6528bc9b04272f73d4d5681be858a6f (patch)
tree48cd87c19d675e00bd328d682f033acff54e57ae /src/init.cpp
parentMerge pull request #2607 from gavinandresen/loadwalletfix (diff)
parentAllow the default key to be unavailable (diff)
downloaddiscoin-61a845dcb6528bc9b04272f73d4d5681be858a6f.tar.xz
discoin-61a845dcb6528bc9b04272f73d4d5681be858a6f.zip
Merge pull request #2566 from sipa/nodef
Allow the default key to be unavailable
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp
index ea380f5a4..3775790b6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -966,11 +966,11 @@ bool AppInit2(boost::thread_group& threadGroup)
RandAddSeedPerfmon();
CPubKey newDefaultKey;
- if (!pwalletMain->GetKeyFromPool(newDefaultKey, false))
- strErrors << _("Cannot initialize keypool") << "\n";
- pwalletMain->SetDefaultKey(newDefaultKey);
- if (!pwalletMain->SetAddressBookName(pwalletMain->vchDefaultKey.GetID(), ""))
- strErrors << _("Cannot write default address") << "\n";
+ if (pwalletMain->GetKeyFromPool(newDefaultKey, false)) {
+ pwalletMain->SetDefaultKey(newDefaultKey);
+ if (!pwalletMain->SetAddressBookName(pwalletMain->vchDefaultKey.GetID(), ""))
+ strErrors << _("Cannot write default address") << "\n";
+ }
}
printf("%s", strErrors.str().c_str());