mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanup.
This commit is contained in:
@@ -40,27 +40,24 @@ void OrderBookDB::setup(Ledger::ref ledger)
|
||||
while (currentIndex.isNonZero())
|
||||
{
|
||||
SLE::pointer entry = ledger->getSLEi(currentIndex);
|
||||
if (entry)
|
||||
OrderBook::pointer book = OrderBook::newOrderBook(entry);
|
||||
if (book)
|
||||
{
|
||||
OrderBook::pointer book = OrderBook::newOrderBook(entry);
|
||||
if (book)
|
||||
cLog(lsTRACE) << "OrderBookDB: found book";
|
||||
|
||||
if (mKnownMap.find(book->getBookBase()) == mKnownMap.end())
|
||||
{
|
||||
cLog(lsTRACE) << "OrderBookDB: found book";
|
||||
mKnownMap[book->getBookBase()] = true;
|
||||
|
||||
if (mKnownMap.find(book->getBookBase()) == mKnownMap.end())
|
||||
{
|
||||
mKnownMap[book->getBookBase()] = true;
|
||||
cLog(lsTRACE) << "OrderBookDB: unknown book in: "
|
||||
<< STAmount::createHumanCurrency(book->getCurrencyIn())
|
||||
<< " -> "
|
||||
<< STAmount::createHumanCurrency(book->getCurrencyOut());
|
||||
|
||||
cLog(lsTRACE) << "OrderBookDB: unknown book in: "
|
||||
<< STAmount::createHumanCurrency(book->getCurrencyIn())
|
||||
<< " -> "
|
||||
<< STAmount::createHumanCurrency(book->getCurrencyOut());
|
||||
|
||||
if (!book->getCurrencyIn()) // XRP
|
||||
mXRPOrders.push_back(book);
|
||||
else
|
||||
mIssuerMap[book->getIssuerIn()].push_back(book);
|
||||
}
|
||||
if (!book->getCurrencyIn()) // XRP
|
||||
mXRPOrders.push_back(book);
|
||||
else
|
||||
mIssuerMap[book->getIssuerIn()].push_back(book);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user