Skip to content

Commit 7e5d94d

Browse files
committed
[Wallet] Trivial cleanup of HD wallet changes
1 parent ea26874 commit 7e5d94d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ CPubKey CWallet::GenerateNewHDMasterKey()
12001200

12011201
// write the key&metadata to the database
12021202
if (!AddKeyPubKey(key, pubkey))
1203-
throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed");
1203+
throw std::runtime_error(std::string(__func__)+": AddKeyPubKey failed");
12041204
}
12051205

12061206
return pubkey;
@@ -3323,7 +3323,6 @@ bool CWallet::InitLoadWallet()
33233323
// Create new keyUser and set as default key
33243324
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
33253325
// generate a new master key
3326-
CKey key;
33273326
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey();
33283327
if (!walletInstance->SetHDMasterKey(masterPubKey))
33293328
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");

0 commit comments

Comments
 (0)