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)
3682
3682
{
3683
3683
// Create new keyUser and set as default key
3684
3684
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
+
3685
3689
// generate a new master key
3686
3690
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey ();
3687
3691
if (!walletInstance->SetHDMasterKey (masterPubKey))
3688
3692
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);
3692
3693
}
3693
3694
CPubKey newDefaultKey;
3694
3695
if (walletInstance->GetKeyFromPool (newDefaultKey, false )) {
You can’t perform that action at this time.
0 commit comments