Merge pull request #1357 from sipa/keyid

Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddress
This commit is contained in:
Pieter Wuille
2012-05-26 10:17:27 -07:00
28 changed files with 579 additions and 400 deletions

View File

@@ -605,11 +605,11 @@ bool AppInit2()
// Create new keyUser and set as default key
RandAddSeedPerfmon();
std::vector<unsigned char> newDefaultKey;
CPubKey newDefaultKey;
if (!pwalletMain->GetKeyFromPool(newDefaultKey, false))
strErrors << _("Cannot initialize keypool") << "\n";
pwalletMain->SetDefaultKey(newDefaultKey);
if (!pwalletMain->SetAddressBookName(CBitcoinAddress(pwalletMain->vchDefaultKey), ""))
if (!pwalletMain->SetAddressBookName(pwalletMain->vchDefaultKey.GetID(), ""))
strErrors << _("Cannot write default address") << "\n";
}