diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-14 11:37:36 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-14 11:37:48 +0200 |
commit | bc94b87487824c6fba45788facf96faba97a4aa6 (patch) | |
tree | 892f7643b7b918be008530da7cc39996e029f153 /src | |
parent | af9b7a9f2f73b1a2f9728106774dd13e8d1cdd8d (diff) | |
parent | b993671921c0c301f18c542e77d695fdc50ffd91 (diff) |
Merge #8324: [Wallet] keep HD seed during salvagewallet
b993671 [Wallet] keep HD seed during salvagewallet (Jonas Schnelli)
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 2 | ||||
-rw-r--r-- | src/wallet/walletdb.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a0095ebd92..7cb294bec1 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3291,7 +3291,7 @@ bool CWallet::InitLoadWallet() if (fFirstRun) { // Create new keyUser and set as default key - if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET)) { + if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) { // generate a new master key CKey key; key.MakeNewKey(true); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 7bfd490950..72af8ab7b2 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -977,7 +977,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue, wss, strType, strErr); } - if (!IsKeyType(strType)) + if (!IsKeyType(strType) && strType != "hdchain") continue; if (!fReadOK) { |