Skip to content

Commit

Permalink
Set label with importprivkey only requested. bitcoin#13087
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntai committed Jun 1, 2018
1 parent 87a9d03 commit ce5431e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,8 @@ bool CWallet::SetAddressBook(const CTxDestination& address, const std::string& s
LOCK(cs_wallet); // mapAddressBook
std::map<CTxDestination, CAddressBookData>::iterator mi = mapAddressBook.find(address);
fUpdated = mi != mapAddressBook.end();
mapAddressBook[address].name = strName;
if (!strName.empty()) /* update name only if requested */
mapAddressBook[address].name = strName;
if (!strPurpose.empty()) /* update purpose only if requested */
mapAddressBook[address].purpose = strPurpose;
}
Expand Down

0 comments on commit ce5431e

Please sign in to comment.