Merge branch 'book'

Conflicts:
	src/cpp/ripple/OrderBookDB.cpp
	src/cpp/ripple/OrderBookDB.h
	src/cpp/ripple/Pathfinder.cpp
This commit is contained in:
jed
2013-02-05 13:47:25 -08:00
15 changed files with 263 additions and 19 deletions

View File

@@ -1321,6 +1321,7 @@ void NetworkOPs::pubAcceptedTransaction(Ledger::ref lpCurrent, const SerializedT
ispListener->send(jvObj);
}
}
theApp->getOrderBookDB().processTxn(stTxn, terResult, meta, jvObj);
pubAccountTransaction(lpCurrent, stTxn, terResult, true, meta);
}
@@ -1451,6 +1452,20 @@ void NetworkOPs::unsubAccount(InfoSub* ispListener, const boost::unordered_set<R
}
}
bool NetworkOPs::subBook(InfoSub* ispListener, uint160 currencyIn, uint160 currencyOut, uint160 issuerIn, uint160 issuerOut)
{
BookListeners::pointer listeners=theApp->getOrderBookDB().makeBookListeners(currencyIn, currencyOut, issuerIn, issuerOut);
if(listeners) listeners->addSubscriber(ispListener);
return(true);
}
bool NetworkOPs::unsubBook(InfoSub* ispListener, uint160 currencyIn, uint160 currencyOut, uint160 issuerIn, uint160 issuerOut)
{
BookListeners::pointer listeners=theApp->getOrderBookDB().getBookListeners(currencyIn, currencyOut, issuerIn, issuerOut);
if(listeners) listeners->removeSubscriber(ispListener);
return(true);
}
void NetworkOPs::newLCL(int proposers, int convergeTime, const uint256& ledgerHash)
{
assert(convergeTime);