|
|
@ -845,12 +845,11 @@ bool LoadWallet(bool& fFirstRunRet) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Create new keyUser and set as default key
|
|
|
|
// Create new keyUser and set as default key
|
|
|
|
RandAddSeedPerfmon(); |
|
|
|
RandAddSeedPerfmon(); |
|
|
|
keyUser.MakeNewKey(); |
|
|
|
|
|
|
|
if (!AddKey(keyUser)) |
|
|
|
CWalletDB walletdb; |
|
|
|
return false; |
|
|
|
vchDefaultKey = GetKeyFromKeyPool(); |
|
|
|
if (!SetAddressBookName(PubKeyToAddress(keyUser.GetPubKey()), "")) |
|
|
|
walletdb.WriteDefaultKey(vchDefaultKey); |
|
|
|
return false; |
|
|
|
walletdb.WriteName(PubKeyToAddress(vchDefaultKey), ""); |
|
|
|
CWalletDB().WriteDefaultKey(keyUser.GetPubKey()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CreateThread(ThreadFlushWalletDB, NULL); |
|
|
|
CreateThread(ThreadFlushWalletDB, NULL); |
|
|
|