Include XRP in usAccountSourceCurrencies so that it can't get included twice.

This commit is contained in:
JoelKatz
2013-04-09 00:43:22 -07:00
parent b2853161df
commit 9f1c975268
3 changed files with 9 additions and 7 deletions

View File

@@ -800,10 +800,15 @@ void Pathfinder::addPathOption(PathOption::pointer pathOption)
}
#endif
boost::unordered_set<uint160> usAccountSourceCurrencies(const RippleAddress& raAccountID, Ledger::ref lrLedger)
boost::unordered_set<uint160> usAccountSourceCurrencies(const RippleAddress& raAccountID, Ledger::ref lrLedger,
bool includeXRP)
{
boost::unordered_set<uint160> usCurrencies;
// YYY Only bother if they are above reserve
if (includeXRP)
usCurrencies.insert(uint160(CURRENCY_XRP));
// List of ripple lines.
AccountItems rippleLines(raAccountID.getAccountID(), lrLedger, AccountItem::pointer(new RippleState()));