Skip to content

Commit 56ac046

Browse files
committed
Merge #8443: [Wallet] Trivial cleanup of HD wallet changes
7e5d94d [Wallet] Trivial cleanup of HD wallet changes (Jonas Schnelli)
2 parents f4e7778 + 7e5d94d commit 56ac046

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;
@@ -3324,7 +3324,6 @@ bool CWallet::InitLoadWallet()
33243324
// Create new keyUser and set as default key
33253325
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
33263326
// generate a new master key
3327-
CKey key;
33283327
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey();
33293328
if (!walletInstance->SetHDMasterKey(masterPubKey))
33303329
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");

0 commit comments

Comments
 (0)