@@ -1546,8 +1546,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
key.MakeNewKey(true);
|
||||
if (!pwalletMain->SetHDMasterKey(key))
|
||||
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");
|
||||
// ensure this wallet.dat can only be opened by clients supporting HD
|
||||
pwalletMain->SetMinVersion(FEATURE_HD);
|
||||
}
|
||||
CPubKey newDefaultKey;
|
||||
if (pwalletMain->GetKeyFromPool(newDefaultKey)) {
|
||||
|
||||
@@ -1382,6 +1382,9 @@ bool CWallet::SetHDMasterKey(const CKey& key)
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
|
||||
// ensure this wallet.dat can only be opened by clients supporting HD
|
||||
SetMinVersion(FEATURE_HD);
|
||||
|
||||
// store the key as normal "key"/"ckey" object
|
||||
// in the database
|
||||
// key metadata is not required
|
||||
|
||||
Reference in New Issue
Block a user