Merge branch 'develop' of github.com:jedmccaleb/NewCoin into develop

This commit is contained in:
Arthur Britto
2013-04-09 01:21:42 -07:00
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()));

View File

@@ -78,7 +78,8 @@ public:
bool bDefaultPath(const STPath& spPath);
};
boost::unordered_set<uint160> usAccountSourceCurrencies(const RippleAddress& raAccountID, Ledger::ref lrLedger);
boost::unordered_set<uint160> usAccountSourceCurrencies(const RippleAddress& raAccountID, Ledger::ref lrLedger,
bool includeXRP);
#endif
// vim:ts=4

View File

@@ -1215,11 +1215,7 @@ Json::Value RPCHandler::doRipplePathFind(Json::Value jvRequest, int& cost)
}
else
{
boost::unordered_set<uint160> usCurrencies = usAccountSourceCurrencies(raSrc, lpLedger);
// Add XRP as a source currency.
// YYY Only bother if they are above reserve.
usCurrencies.insert(uint160(CURRENCY_XRP));
boost::unordered_set<uint160> usCurrencies = usAccountSourceCurrencies(raSrc, lpLedger, true);
jvSrcCurrencies = Json::Value(Json::arrayValue);