File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3682,13 +3682,14 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
36823682 {
36833683 // Create new keyUser and set as default key
36843684 if (GetBoolArg (" -usehd" , DEFAULT_USE_HD_WALLET) && !walletInstance->IsHDEnabled ()) {
3685+
3686+ // ensure this wallet.dat can only be opened by clients supporting HD with chain split
3687+ walletInstance->SetMinVersion (FEATURE_HD_SPLIT);
3688+
36853689 // generate a new master key
36863690 CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey ();
36873691 if (!walletInstance->SetHDMasterKey (masterPubKey))
36883692 throw std::runtime_error (std::string (__func__) + " : Storing master key failed" );
3689-
3690- // ensure this wallet.dat can only be opened by clients supporting HD with chain split
3691- walletInstance->SetMinVersion (FEATURE_HD_SPLIT);
36923693 }
36933694 CPubKey newDefaultKey;
36943695 if (walletInstance->GetKeyFromPool (newDefaultKey, false )) {
You can’t perform that action at this time.
0 commit comments