From a4f137f367a898dc3acddc778c4fe9c53ac303c9 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Fri, 15 Jul 2016 11:42:47 +0200 Subject: [Wallet] Ensure <0.13 clients can't open HD wallets --- src/wallet/wallet.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wallet/wallet.cpp') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 46ed54215..ae0a546ea 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)) { -- cgit v1.2.3