add account_offers and refactor

This commit is contained in:
jed
2012-12-04 12:12:11 -08:00
parent 4ef15c5536
commit 50953ff6d5
19 changed files with 257 additions and 138 deletions

View File

@@ -1,6 +1,6 @@
#include "Pathfinder.h"
#include "Application.h"
#include "RippleLines.h"
#include "AccountItems.h"
#include "Log.h"
#include <boost/foreach.hpp>
@@ -221,10 +221,12 @@ bool Pathfinder::findPaths(int maxSearchSteps, int maxPay, STPathSet& retPathSet
// Last element is for non-XRP continue by adding ripple lines and order books.
// Create new paths for each outbound account not already in the path.
RippleLines rippleLines(ele.mAccountID);
AccountItems rippleLines(ele.mAccountID, AccountItem::pointer(new RippleState()));
BOOST_FOREACH(RippleState::pointer line, rippleLines.getLines())
BOOST_FOREACH(AccountItem::pointer item, rippleLines.getItems())
{
RippleState* line=(RippleState*)item.get();
if (!path.hasSeen(line->getAccountIDPeer().getAccountID()))
{
STPath new_path(path);