Permalink
Browse files

Move SetMinVersion for FEATURE_HD to SetHDMasterKey

Github-Pull: #8378
Rebased-From: 6523fca
  • Loading branch information...
pstratem authored and laanwj committed Jul 20, 2016
1 parent f0ff08d commit ebea65121e6c62f6b6acd79408a681b987126a0d
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/wallet/wallet.cpp
View
@@ -1170,6 +1170,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
@@ -3299,9 +3302,6 @@ bool CWallet::InitLoadWallet()
key.MakeNewKey(true);
if (!walletInstance->SetHDMasterKey(key))
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");
// ensure this wallet.dat can only be opened by clients supporting HD
walletInstance->SetMinVersion(FEATURE_HD);
}
CPubKey newDefaultKey;
if (walletInstance->GetKeyFromPool(newDefaultKey)) {

0 comments on commit ebea651

Please sign in to comment.