MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / DelAddressBook

Method DelAddressBook

src/wallet/wallet.cpp:3247–3265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3245}
3246
3247bool 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
3267const std::string& CWallet::GetLabelName(const CScript& scriptPubKey) const
3268{

Callers 1

delAddressBookMethod · 0.80

Calls 8

EncodeDestinationFunction · 0.85
WalletBatchClass · 0.85
NotifyAddressBookChangedFunction · 0.85
IsMineFunction · 0.85
ErasePurposeMethod · 0.80
EraseNameMethod · 0.80
EraseDestDataMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected