Browse Source

create keypool in LoadWallet()

miguelfreitas
Nils Schneider 14 years ago
parent
commit
ca81b168d9
  1. 11
      src/db.cpp

11
src/db.cpp

@ -845,12 +845,11 @@ bool LoadWallet(bool& fFirstRunRet) @@ -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);

Loading…
Cancel
Save