xrpld
Loading...
Searching...
No Matches
BookChanges.cpp
1#include <xrpld/rpc/BookChanges.h>
2
3#include <xrpld/rpc/Context.h>
4#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
5
6#include <xrpl/ledger/ReadView.h>
7#include <xrpl/protocol/STArray.h> // IWYU pragma: keep
8
9#include <memory>
10
11namespace xrpl {
12
13json::Value
15{
17
18 json::Value result = rpc::lookupLedger(ledger, context);
19 if (ledger == nullptr)
20 return result;
21
22 return rpc::computeBookChanges(ledger);
23}
24
25} // namespace xrpl
Represents a JSON value.
Definition json_value.h:117
json::Value computeBookChanges(std::shared_ptr< L const > const &lpAccepted)
Definition BookChanges.h:39
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext const &context, json::Value &result)
Looks up a ledger from a request and fills a json::Value with ledger data.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
json::Value doBookChanges(rpc::JsonContext &)