From 3624356e82015c980fa7b7e60dfbe128665b1952 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Tue, 16 Jul 2013 09:01:09 +1000 Subject: Refactor: Move GetAccountAddresses to CWallet --- src/wallet.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 4f3516953c..c0f2d74ca7 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1812,6 +1812,19 @@ set< set > CWallet::GetAddressGroupings() return ret; } +set CWallet::GetAccountAddresses(string strAccount) const +{ + set 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) -- cgit v1.2.3