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

@@ -64,6 +64,22 @@ public:
)
};
/** Address book data */
class CAddressBookData
{
public:
std::string name;
CAddressBookData()
{
}
IMPLEMENT_SERIALIZE
(
READWRITE(name);
)
};
/** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,
* and provides the ability to create new transactions.
*/
@@ -124,7 +140,7 @@ public:
int64 nOrderPosNext;
std::map<uint256, int> mapRequestCount;
std::map<CTxDestination, std::string> mapAddressBook;
std::map<CTxDestination, CAddressBookData> mapAddressBook;
CPubKey vchDefaultKey;