File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3299,6 +3299,9 @@ bool CWallet::InitLoadWallet()
3299
3299
key.MakeNewKey (true );
3300
3300
if (!walletInstance->SetHDMasterKey (key))
3301
3301
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);
3302
3305
}
3303
3306
CPubKey newDefaultKey;
3304
3307
if (walletInstance->GetKeyFromPool (newDefaultKey)) {
Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ enum WalletFeature
78
78
FEATURE_WALLETCRYPT = 40000 , // wallet encryption
79
79
FEATURE_COMPRPUBKEY = 60000 , // compressed public keys
80
80
81
- FEATURE_LATEST = 60000
81
+ FEATURE_HD = 130000 , // Hierarchical key derivation after BIP32 (HD Wallet)
82
+ FEATURE_LATEST = FEATURE_COMPRPUBKEY // HD is optional, use FEATURE_COMPRPUBKEY as latest version
82
83
};
83
84
84
85
You can’t perform that action at this time.
0 commit comments