aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-07-16 09:01:09 +1000
committerGavin Andresen <gavinandresen@gmail.com>2013-08-22 11:05:45 +1000
commit3624356e82015c980fa7b7e60dfbe128665b1952 (patch)
tree0002752cd17fa71e5065232c91ae7be83bc8f2bf /src/rpcwallet.cpp
parent618855133d4ae4ece130aec3b35c5a65bea95b8f (diff)
Refactor: Move GetAccountAddresses to CWallet
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r--src/rpcwallet.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index b233b654b5..78f561a0a9 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -421,17 +421,6 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
}
-void GetAccountAddresses(string strAccount, set<CTxDestination>& setAddress)
-{
- BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& item, pwalletMain->mapAddressBook)
- {
- const CTxDestination& address = item.first;
- const string& strName = item.second.name;
- if (strName == strAccount)
- setAddress.insert(address);
- }
-}
-
Value getreceivedbyaccount(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
@@ -446,8 +435,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp)
// Get the set of pub keys assigned to account
string strAccount = AccountFromValue(params[0]);
- set<CTxDestination> setAddress;
- GetAccountAddresses(strAccount, setAddress);
+ set<CTxDestination> setAddress = pwalletMain->GetAccountAddresses(strAccount);
// Tally
int64 nAmount = 0;