|
|
@ -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) |
|
|
|
Value getreceivedbyaccount(const Array& params, bool fHelp) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (fHelp || params.size() < 1 || params.size() > 2) |
|
|
|
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
|
|
|
|
// Get the set of pub keys assigned to account
|
|
|
|
string strAccount = AccountFromValue(params[0]); |
|
|
|
string strAccount = AccountFromValue(params[0]); |
|
|
|
set<CTxDestination> setAddress; |
|
|
|
set<CTxDestination> setAddress = pwalletMain->GetAccountAddresses(strAccount); |
|
|
|
GetAccountAddresses(strAccount, setAddress); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tally
|
|
|
|
// Tally
|
|
|
|
int64 nAmount = 0; |
|
|
|
int64 nAmount = 0; |
|
|
|