diff options
author | Nils Schneider <nils.schneider@gmail.com> | 2011-06-03 18:03:12 +0200 |
---|---|---|
committer | Nils Schneider <nils.schneider@gmail.com> | 2011-06-03 18:04:41 +0200 |
commit | ca81b168d9ba61d918f029c0d8bf520ef2da1d3d (patch) | |
tree | fdc1553d3bded5668a7239af7ad15e4f2d73acac /src | |
parent | e104c7937455bf2c9b535ec14ea710a97b66750b (diff) |
create keypool in LoadWallet()
Diffstat (limited to 'src')
-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); |