bug fixes in both backends. add ledger_range rpc. improve test scripts

This commit is contained in:
CJ Cobb
2021-03-05 16:46:55 -05:00
parent 7a6dfe5967
commit e3a121e571
13 changed files with 179 additions and 51 deletions

View File

@@ -41,12 +41,14 @@ enum RPCCommand {
ledger,
account_info,
ledger_data,
book_offers
book_offers,
ledger_range
};
std::unordered_map<std::string, RPCCommand> commandMap{
{"tx", tx},
{"account_tx", account_tx},
{"ledger", ledger},
{"ledger_range", ledger_range},
{"account_info", account_info},
{"ledger_data", ledger_data},
{"book_offers", book_offers}};
@@ -71,6 +73,10 @@ doBookOffers(
BackendInterface const& backend);
boost::json::object
doLedger(boost::json::object const& request, BackendInterface const& backend);
boost::json::object
doLedgerRange(
boost::json::object const& request,
BackendInterface const& backend);
boost::json::object
buildResponse(
@@ -91,6 +97,9 @@ buildResponse(
case ledger:
return doLedger(request, backend);
break;
case ledger_range:
return doLedgerRange(request, backend);
break;
case ledger_data:
return doLedgerData(request, backend);
break;