Skip to content

Commit

Permalink
snip an unneeded comment; inline a couple of variables in
Browse files Browse the repository at this point in the history
CWallet::GetAccountAddresses()
  • Loading branch information
mikegogulski committed Dec 26, 2012
1 parent d4c4aad commit 981ff1f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/wallet.cpp
Expand Up @@ -1915,16 +1915,14 @@ int64 CWallet::GetAccountBalance(const string& strAccount, int nMinDepth)
return nBalance;
}

// TODO: Move to set<CTxDestination> CWallet::GetAccountAddresses(const std::string strAccount)
std::set<CTxDestination> CWallet::GetAccountAddresses(std::string strAccount)
{
set<CTxDestination> setRet;
BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& item, mapAddressBook)
{
const CTxDestination& address = item.first;
const string& strName = item.second;
if (strName == strAccount)
setRet.insert(address);
if (item.second == strAccount)
// push address into set
setRet.insert(item.first);
}
return setRet;
}

0 comments on commit 981ff1f

Please sign in to comment.