diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-06-12 12:27:01 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-06-12 12:27:01 +0200 |
commit | 18cf214528d14692941311be154214cab1772ed5 (patch) | |
tree | f3525c858aadbff78832fb9a4198077fbbc27b1f /src/db.cpp | |
parent | 0424613ba24de94b58f6fa7bf1627fd4e2807208 (diff) | |
download | bitcoin-18cf214528d14692941311be154214cab1772ed5.tar.xz |
update bitcoin core to git ce148944c776ae8e91cc058f44ddce356c7cebc9
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/db.cpp b/src/db.cpp index 52c0f5b4c3..c2c239db2f 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -845,12 +845,11 @@ bool LoadWallet(bool& fFirstRunRet) { // Create new keyUser and set as default key RandAddSeedPerfmon(); - keyUser.MakeNewKey(); - if (!AddKey(keyUser)) - return false; - if (!SetAddressBookName(PubKeyToAddress(keyUser.GetPubKey()), "")) - return false; - CWalletDB().WriteDefaultKey(keyUser.GetPubKey()); + + CWalletDB walletdb; + vchDefaultKey = GetKeyFromKeyPool(); + walletdb.WriteDefaultKey(vchDefaultKey); + walletdb.WriteName(PubKeyToAddress(vchDefaultKey), ""); } CreateThread(ThreadFlushWalletDB, NULL); |