File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1170,6 +1170,9 @@ bool CWallet::SetHDMasterKey(const CKey& key)
1170
1170
{
1171
1171
LOCK (cs_wallet);
1172
1172
1173
+ // ensure this wallet.dat can only be opened by clients supporting HD
1174
+ SetMinVersion (FEATURE_HD);
1175
+
1173
1176
// store the key as normal "key"/"ckey" object
1174
1177
// in the database
1175
1178
// key metadata is not required
@@ -3299,9 +3302,6 @@ bool CWallet::InitLoadWallet()
3299
3302
key.MakeNewKey (true );
3300
3303
if (!walletInstance->SetHDMasterKey (key))
3301
3304
throw std::runtime_error (" CWallet::GenerateNewKey(): Storing master key failed" );
3302
-
3303
- // ensure this wallet.dat can only be opened by clients supporting HD
3304
- walletInstance->SetMinVersion (FEATURE_HD);
3305
3305
}
3306
3306
CPubKey newDefaultKey;
3307
3307
if (walletInstance->GetKeyFromPool (newDefaultKey)) {
You can’t perform that action at this time.
0 commit comments