Refactor: CAddressBookData for mapAddressBook

Straight refactor, so mapAddressBook stores a CAddressBookData
(which just contains a std::string) instead of a std::string.

Preparation for payment protocol work, which will add the notion
of refund addresses to the address book.
This commit is contained in:
Gavin Andresen
2013-07-15 15:20:50 +10:00
parent b94595bb7f
commit 618855133d
9 changed files with 54 additions and 38 deletions

View File

@@ -214,10 +214,10 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
{
LOCK(wallet->cs_wallet);
std::map<CTxDestination, std::string>::iterator mi = wallet->mapAddressBook.find(dest);
std::map<CTxDestination, CAddressBookData>::iterator mi = wallet->mapAddressBook.find(dest);
// Check if we have a new address or an updated label
if (mi == wallet->mapAddressBook.end() || mi->second != strLabel)
if (mi == wallet->mapAddressBook.end() || mi->second.name != strLabel)
{
wallet->SetAddressBookName(dest, strLabel);
}