mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Move SetMinVersion for FEATURE_HD to SetHDMasterKey
This commit is contained in:
parent
045106b4f1
commit
6523fcaab2
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user