Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 3,510 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
bool CWallet::DelAddressBook(const CTxDestination &address) { | bool CWallet::DelAddressBook(const CTxDestination &address) { | ||||
{ | { | ||||
// mapAddressBook | // mapAddressBook | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
// Delete destdata tuples associated with address. | // Delete destdata tuples associated with address. | ||||
for (const std::pair<std::string, std::string> &item : | for (const std::pair<const std::string, std::string> &item : | ||||
mapAddressBook[address].destdata) { | mapAddressBook[address].destdata) { | ||||
WalletBatch(*database).EraseDestData(address, item.first); | WalletBatch(*database).EraseDestData(address, item.first); | ||||
} | } | ||||
mapAddressBook.erase(address); | mapAddressBook.erase(address); | ||||
} | } | ||||
NotifyAddressBookChanged(this, address, "", | NotifyAddressBookChanged(this, address, "", | ||||
▲ Show 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | std::set<std::set<CTxDestination>> CWallet::GetAddressGroupings() { | ||||
return ret; | return ret; | ||||
} | } | ||||
std::set<CTxDestination> | std::set<CTxDestination> | ||||
CWallet::GetLabelAddresses(const std::string &label) const { | CWallet::GetLabelAddresses(const std::string &label) const { | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
std::set<CTxDestination> result; | std::set<CTxDestination> result; | ||||
for (const std::pair<CTxDestination, CAddressBookData> &item : | for (const std::pair<const CTxDestination, CAddressBookData> &item : | ||||
mapAddressBook) { | mapAddressBook) { | ||||
const CTxDestination &address = item.first; | const CTxDestination &address = item.first; | ||||
const std::string &strName = item.second.name; | const std::string &strName = item.second.name; | ||||
if (strName == label) { | if (strName == label) { | ||||
result.insert(address); | result.insert(address); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 830 Lines • Show Last 20 Lines |