diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-07-15 11:42:47 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-07-18 22:56:45 +0200 |
commit | a4f137f367a898dc3acddc778c4fe9c53ac303c9 (patch) | |
tree | 1a22824142a9f8bb3d5dd4b324c28168d917efd3 /src/wallet/wallet.cpp | |
parent | 5e3557b8e36308a27dbeb528569abe638c4d01dd (diff) |
[Wallet] Ensure <0.13 clients can't open HD wallets
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 46ed542158..ae0a546ea1 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3299,6 +3299,9 @@ 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)) { |