mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
still working
This commit is contained in:
@@ -3,8 +3,13 @@
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
OrderBookDB::OrderBookDB()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// TODO: this would be way faster if we could just look under the order dirs
|
||||
OrderBookDB::OrderBookDB(Ledger::pointer ledger)
|
||||
void OrderBookDB::setup(Ledger::pointer ledger)
|
||||
{
|
||||
// walk through the entire ledger looking for orderbook entries
|
||||
uint256 currentIndex=ledger->getFirstLedgerIndex();
|
||||
@@ -53,4 +58,41 @@ void OrderBookDB::getBooks(const uint160& issuerID, const uint160& currencyID, s
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OrderBook::pointer OrderBookDB::getBook(uint160 mCurrencyIn, uint160 mCurrencyOut, uint160 mIssuerIn, uint160 mIssuerOut)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
"CreatedNode" : {
|
||||
"LedgerEntryType" : "Offer",
|
||||
"LedgerIndex" : "F353BF8A7DCE35EA2985596F4C8421E30EF3B9A21618566BFE0ED00B62A8A5AB",
|
||||
"NewFields" : {
|
||||
"Account" : "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY",
|
||||
"BookDirectory" : "FF26BE244767D0EA9EFD523941439009E4185E4CBB918F714C08E1BC9BF04000",
|
||||
"Sequence" : 112,
|
||||
"TakerGets" : "400000000",
|
||||
"TakerPays" : {
|
||||
"currency" : "BTC",
|
||||
"issuer" : "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"value" : "1"
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void OrderBookDB::processTxn(const SerializedTransaction& stTxn, TER terResult,TransactionMetaSet::pointer& meta,Json::Value& jvObj)
|
||||
{
|
||||
// check if this is an offer or an offer cancel or a payment that consumes an offer
|
||||
//check to see what the meta looks like
|
||||
BOOST_FOREACH(STObject& node,meta->getNodes())
|
||||
{
|
||||
if(node.getFieldU16(sfLedgerEntryType)==ltOFFER)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user