xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
xrpld
rpc
handlers
admin
BlackList.cpp
1
#include <xrpld/app/main/Application.h>
2
#include <xrpld/rpc/Context.h>
3
4
#include <xrpl/json/json_value.h>
5
#include <xrpl/protocol/jss.h>
6
#include <xrpl/resource/ResourceManager.h>
7
8
namespace
xrpl
{
9
10
json::Value
11
doBlackList
(
rpc::JsonContext
& context)
12
{
13
auto
& rm = context.
app
.
getResourceManager
();
14
if
(context.
params
.
isMember
(jss::threshold))
15
{
16
return
rm.getJson(context.
params
[jss::threshold].
asInt
());
17
}
18
19
return
rm.
getJson
();
20
}
21
22
}
// namespace xrpl
json::Value::isMember
bool isMember(char const *key) const
Return true if the object has a member named key.
Definition
json_value.cpp:1049
json::Value::asInt
Int asInt() const
Definition
json_value.cpp:530
xrpl::ServiceRegistry::getResourceManager
virtual resource::Manager & getResourceManager()=0
xrpl::resource::Manager::getJson
virtual json::Value getJson()=0
Extract consumer information for reporting.
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::doBlackList
json::Value doBlackList(rpc::JsonContext &context)
Definition
BlackList.cpp:11
xrpl::rpc::Context::app
Application & app
Definition
Context.h:29
xrpl::rpc::JsonContext
Definition
Context.h:41
xrpl::rpc::JsonContext::params
json::Value params
Definition
Context.h:51
Generated by
1.17.0