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
8
#include <
memory
>
9
10
namespace
xrpl
{
11
12
json::Value
13
doBookChanges
(
RPC::JsonContext
& context)
14
{
15
std::shared_ptr<ReadView const>
ledger;
16
17
json::Value
result =
RPC::lookupLedger
(ledger, context);
18
if
(ledger ==
nullptr
)
19
return
result;
20
21
return
RPC::computeBookChanges
(ledger);
22
}
23
24
}
// namespace xrpl
json::Value
Represents a JSON value.
Definition
json_value.h:130
memory
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:350
xrpl::RPC::computeBookChanges
json::Value computeBookChanges(std::shared_ptr< L const > const &lpAccepted)
Definition
BookChanges.h:27
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:13
std::shared_ptr
xrpl::RPC::JsonContext
Definition
Context.h:33
Generated by
1.16.1