mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
19 lines
516 B
C++
19 lines
516 B
C++
#include "OrderBook.h"
|
|
#include "Ledger.h"
|
|
|
|
OrderBook::OrderBook(SerializedLedgerEntry::ref ledgerEntry)
|
|
{
|
|
const STAmount saTakerGets = ledgerEntry->getFieldAmount(sfTakerGets);
|
|
const STAmount saTakerPays = ledgerEntry->getFieldAmount(sfTakerPays);
|
|
|
|
mCurrencyIn = saTakerPays.getCurrency();
|
|
mCurrencyOut = saTakerGets.getCurrency();
|
|
mIssuerIn = saTakerPays.getIssuer();
|
|
mIssuerOut = saTakerGets.getIssuer();
|
|
|
|
mBookBase=Ledger::getBookBase(mCurrencyIn, mIssuerIn, mCurrencyOut, mIssuerOut);
|
|
}
|
|
|
|
|
|
// vim:ts=4
|