diff options
| author | Gavin Andresen <[email protected]> | 2013-07-16 09:01:09 +1000 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-08-22 11:05:45 +1000 |
| commit | 3624356e82015c980fa7b7e60dfbe128665b1952 (patch) | |
| tree | 0002752cd17fa71e5065232c91ae7be83bc8f2bf /src/wallet.cpp | |
| parent | Refactor: CAddressBookData for mapAddressBook (diff) | |
| download | discoin-3624356e82015c980fa7b7e60dfbe128665b1952.tar.xz discoin-3624356e82015c980fa7b7e60dfbe128665b1952.zip | |
Refactor: Move GetAccountAddresses to CWallet
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 4f3516953..c0f2d74ca 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1812,6 +1812,19 @@ set< set<CTxDestination> > CWallet::GetAddressGroupings() return ret; } +set<CTxDestination> CWallet::GetAccountAddresses(string strAccount) const +{ + set<CTxDestination> result; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& item, mapAddressBook) + { + const CTxDestination& address = item.first; + const string& strName = item.second.name; + if (strName == strAccount) + result.insert(address); + } + return result; +} + bool CReserveKey::GetReservedKey(CPubKey& pubkey) { if (nIndex == -1) |