File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1306,10 +1306,6 @@ CPubKey CWallet::GenerateNewHDMasterKey()
13061306bool CWallet::SetHDMasterKey (const CPubKey& pubkey)
13071307{
13081308 LOCK (cs_wallet);
1309-
1310- // ensure this wallet.dat can only be opened by clients supporting HD with chain split
1311- SetMinVersion (FEATURE_HD_SPLIT);
1312-
13131309 // store the keyid (hash160) together with
13141310 // the child index counter in the database
13151311 // as a hdchain object
@@ -3670,6 +3666,9 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
36703666 CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey ();
36713667 if (!walletInstance->SetHDMasterKey (masterPubKey))
36723668 throw std::runtime_error (std::string (__func__) + " : Storing master key failed" );
3669+
3670+ // ensure this wallet.dat can only be opened by clients supporting HD with chain split
3671+ walletInstance->SetMinVersion (FEATURE_HD_SPLIT);
36733672 }
36743673 CPubKey newDefaultKey;
36753674 if (walletInstance->GetKeyFromPool (newDefaultKey, false )) {
You can’t perform that action at this time.
0 commit comments