| 3245 | } |
| 3246 | |
| 3247 | bool CWallet::DelAddressBook(const CTxDestination& address) |
| 3248 | { |
| 3249 | { |
| 3250 | LOCK(cs_wallet); // mapAddressBook |
| 3251 | |
| 3252 | // Delete destdata tuples associated with address |
| 3253 | std::string strAddress = EncodeDestination(address); |
| 3254 | for (const std::pair<const std::string, std::string> &item : mapAddressBook[address].destdata) |
| 3255 | { |
| 3256 | WalletBatch(*database).EraseDestData(strAddress, item.first); |
| 3257 | } |
| 3258 | mapAddressBook.erase(address); |
| 3259 | } |
| 3260 | |
| 3261 | NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address) != ISMINE_NO, "", CT_DELETED); |
| 3262 | |
| 3263 | WalletBatch(*database).ErasePurpose(EncodeDestination(address)); |
| 3264 | return WalletBatch(*database).EraseName(EncodeDestination(address)); |
| 3265 | } |
| 3266 | |
| 3267 | const std::string& CWallet::GetLabelName(const CScript& scriptPubKey) const |
| 3268 | { |
no test coverage detected