xrpld
Loading...
Searching...
No Matches
Fee.cpp
1#include <xrpld/app/main/Application.h>
2#include <xrpld/app/misc/TxQ.h>
3#include <xrpld/rpc/Context.h>
4
5#include <xrpl/beast/utility/instrumentation.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/protocol/ErrorCodes.h>
8
9namespace xrpl {
10json::Value
12{
13 auto result = context.app.getTxQ().doRPC(context.app);
14 if (result.type() == json::ValueType::Object)
15 return result;
16
17 // LCOV_EXCL_START
18 UNREACHABLE("xrpl::doFee : invalid result type");
20 return context.params;
21 // LCOV_EXCL_STOP
22}
23
24} // namespace xrpl
virtual TxQ & getTxQ()=0
json::Value doRPC(Application &app) const
Summarize current fee metrics for the fee RPC command.
Definition TxQ.cpp:1818
@ Object
object value (collection of name/value pairs).
Definition json_value.h:26
void injectError(ErrorCodeI code, json::Value &json)
Add or update the json update to reflect the error code.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
@ RpcInternal
Definition ErrorCodes.h:112
json::Value doFee(RPC::JsonContext &)
Definition Fee.cpp:11
Application & app
Definition Context.h:21
json::Value params
Definition Context.h:43