diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-20 11:57:22 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-20 11:57:30 +0200 |
commit | 8e048f40cc25b6ad3f49d2828c8562b657d91ced (patch) | |
tree | 98f7f8582485b054f0c56689012da12d6a7744bd | |
parent | c98abf2c7099fa089cd9170dcdd118ba86356ffc (diff) | |
parent | 6523fcaab2f0808d4e47b9cb9ebbef7ed69a309e (diff) |
Merge #8378: [Wallet]Move SetMinVersion for FEATURE_HD to SetHDMasterKey
6523fca Move SetMinVersion for FEATURE_HD to SetHDMasterKey (Patrick Strateman)
-rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a76085de30..5908dfeace 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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)) { |