mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-21 04:05:51 +00:00
actually handle book_offers
This commit is contained in:
@@ -35,13 +35,21 @@
|
||||
#include <vector>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
enum RPCCommand { tx, account_tx, ledger, account_info, ledger_data };
|
||||
enum RPCCommand {
|
||||
tx,
|
||||
account_tx,
|
||||
ledger,
|
||||
account_info,
|
||||
ledger_data,
|
||||
book_offers
|
||||
};
|
||||
std::unordered_map<std::string, RPCCommand> commandMap{
|
||||
{"tx", tx},
|
||||
{"account_tx", account_tx},
|
||||
{"ledger", ledger},
|
||||
{"account_info", account_info},
|
||||
{"ledger_data", ledger_data}};
|
||||
{"ledger_data", ledger_data},
|
||||
{"book_offers", book_offers}};
|
||||
|
||||
boost::json::object
|
||||
doAccountInfo(
|
||||
@@ -62,6 +70,11 @@ boost::json::object
|
||||
doLedgerData(
|
||||
boost::json::object const& request,
|
||||
CassandraFlatMapBackend const& backend);
|
||||
boost::json::object
|
||||
doBookOffers(
|
||||
boost::json::object const& request,
|
||||
CassandraFlatMapBackend const& backend,
|
||||
std::shared_ptr<PgPool>& pgPool);
|
||||
|
||||
boost::json::object
|
||||
buildResponse(
|
||||
@@ -88,6 +101,9 @@ buildResponse(
|
||||
case account_info:
|
||||
return doAccountInfo(request, backend, pgPool);
|
||||
break;
|
||||
case book_offers:
|
||||
return doBookOffers(request, backend, pgPool);
|
||||
break;
|
||||
default:
|
||||
BOOST_LOG_TRIVIAL(error) << "Unknown command: " << command;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user