xrpld
Loading...
Searching...
No Matches
xrpld
rpc
handlers
orderbook
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
11
namespace
xrpl
{
12
13
json::Value
14
doBookChanges
(
rpc::JsonContext
& context)
15
{
16
std::shared_ptr<ReadView const>
ledger;
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
json::Value
Represents a JSON value.
Definition
json_value.h:117
memory
xrpl::rpc::computeBookChanges
json::Value computeBookChanges(std::shared_ptr< L const > const &lpAccepted)
Definition
BookChanges.h:39
xrpl::rpc::lookupLedger
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.
Definition
RPCLedgerHelpers.cpp:361
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::doBookChanges
json::Value doBookChanges(rpc::JsonContext &)
Definition
BookChanges.cpp:14
std::shared_ptr
xrpl::rpc::JsonContext
Definition
Context.h:41
Generated by
1.16.1