xrpld
Loading...
Searching...
No Matches
xrpld
rpc
handlers
admin
status
ConsensusInfo.cpp
1
#include <xrpld/rpc/Context.h>
2
3
#include <xrpl/json/json_value.h>
4
#include <xrpl/protocol/jss.h>
5
#include <xrpl/server/NetworkOPs.h>
6
7
namespace
xrpl
{
8
9
json::Value
10
doConsensusInfo
(
RPC::JsonContext
& context)
11
{
12
json::Value
ret(
json::ValueType::Object
);
13
14
ret[jss::info] = context.
netOps
.
getConsensusInfo
();
15
16
return
ret;
17
}
18
19
}
// namespace xrpl
json::Value
Represents a JSON value.
Definition
json_value.h:130
xrpl::NetworkOPs::getConsensusInfo
virtual json::Value getConsensusInfo()=0
json::ValueType::Object
@ Object
object value (collection of name/value pairs).
Definition
json_value.h:26
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::doConsensusInfo
json::Value doConsensusInfo(RPC::JsonContext &context)
Definition
ConsensusInfo.cpp:10
xrpl::RPC::Context::netOps
NetworkOPs & netOps
Definition
Context.h:23
xrpl::RPC::JsonContext
Definition
Context.h:33
Generated by
1.16.1