#include <OrderBookDBImpl.h>
Definition at line 31 of file OrderBookDBImpl.h.
◆ BookToListenersMap
◆ OrderBookDBImpl()
◆ setup()
Initialize or update the order book database with a new ledger.
This method should be called when a new ledger is accepted to update the order book database with the current state of all order books.
- Parameters
-
| ledger | The ledger to scan for order books |
Implements xrpl::OrderBookDB.
Definition at line 27 of file OrderBookDBImpl.cpp.
◆ addOrderBook()
| void xrpl::OrderBookDBImpl::addOrderBook |
( |
Book const & |
book | ) |
|
|
overridevirtual |
◆ getBooksByTakerPays()
Get all order books that want a specific issue.
Returns a list of all order books where the taker pays the specified issue. This is useful for pathfinding to find all possible next hops from a given currency.
- Parameters
-
| issue | The issue to search for |
| domain | Optional domain restriction for the order book |
- Returns
- Vector of books that want this issue
Implements xrpl::OrderBookDB.
Definition at line 203 of file OrderBookDBImpl.cpp.
◆ getBookSize()
Get the count of order books that want a specific issue.
- Parameters
-
| issue | The issue to search for |
| domain | Optional domain restriction for the order book |
- Returns
- Number of books that want this issue
Implements xrpl::OrderBookDB.
Definition at line 235 of file OrderBookDBImpl.cpp.
◆ isBookToXRP()
Check if an order book to XRP exists for the given issue.
- Parameters
-
| issue | The issue to check |
| domain | Optional domain restriction for the order book |
- Returns
- true if a book from this issue to XRP exists
Implements xrpl::OrderBookDB.
Definition at line 254 of file OrderBookDBImpl.cpp.
◆ update()
◆ processTxn()
Process a transaction for order book tracking.
- Parameters
-
| ledger | The ledger the transaction was applied to |
| alTx | The transaction to process |
| jvObj | The JSON object of the transaction |
Implements xrpl::OrderBookDB.
Definition at line 298 of file OrderBookDBImpl.cpp.
◆ getBookListeners()
Get the book listeners for a book.
- Parameters
-
| book | The book to get the listeners for |
- Returns
- The book listeners for the book
Implements xrpl::OrderBookDB.
Definition at line 283 of file OrderBookDBImpl.cpp.
◆ makeBookListeners()
Create a new book listeners for a book.
- Parameters
-
| book | The book to create the listeners for |
- Returns
- The new book listeners for the book
Implements xrpl::OrderBookDB.
Definition at line 263 of file OrderBookDBImpl.cpp.
◆ registry_
◆ pathSearchMax_
| int const xrpl::OrderBookDBImpl::pathSearchMax_ |
|
private |
◆ standalone_
| bool const xrpl::OrderBookDBImpl::standalone_ |
|
private |
◆ allBooks_
◆ domainBooks_
◆ xrpBooks_
◆ xrpDomainBooks_
◆ mLock
◆ mListeners
◆ seq_
◆ j_