aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-08-01 15:18:15 +0200
committerLuke Dashjr <luke-jr+git@utopios.org>2016-09-21 02:43:47 +0000
commit464dedd6ab496bb520cc8a5b1b69ca7ebdcdf815 (patch)
treec0ed3fa8635e61767f4d705b30678cb7308094b3
parentb17a3f9e5af0a97a4d744bcbdac11fcb19de546c (diff)
downloadbitcoin-464dedd6ab496bb520cc8a5b1b69ca7ebdcdf815.tar.xz
[Wallet] Trivial cleanup of HD wallet changes
Github-Pull: #8443 Rebased-From: 7e5d94df1fb09ed7ee7ed50032f876972ef39489
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 2fea5ed391..12b83e54c7 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1199,7 +1199,7 @@ CPubKey CWallet::GenerateNewHDMasterKey()
// write the key&metadata to the database
if (!AddKeyPubKey(key, pubkey))
- throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed");
+ throw std::runtime_error(std::string(__func__)+": AddKeyPubKey failed");
}
return pubkey;
@@ -3331,7 +3331,6 @@ bool CWallet::InitLoadWallet()
// Create new keyUser and set as default key
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
// generate a new master key
- CKey key;
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey();
if (!walletInstance->SetHDMasterKey(masterPubKey))
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");