diff options
author | Patrick Strateman <patrick.strateman@gmail.com> | 2016-07-19 22:30:17 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-20 11:58:11 +0200 |
commit | ebea65121e6c62f6b6acd79408a681b987126a0d (patch) | |
tree | fae265184f331c1c04673f026c31d38cbe3aa31f | |
parent | f0ff08d7841c58d5a7ae27a87a38837270e4b2d0 (diff) | |
download | bitcoin-ebea65121e6c62f6b6acd79408a681b987126a0d.tar.xz |
Move SetMinVersion for FEATURE_HD to SetHDMasterKey
Github-Pull: #8378
Rebased-From: 6523fcaab2f0808d4e47b9cb9ebbef7ed69a309e
-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)) { |