rippled
Loading...
Searching...
No Matches
xrpld
rpc
handlers
ConsensusInfo.cpp
1
#include <xrpld/rpc/Context.h>
2
3
#include <xrpl/json/json_value.h>
4
#include <xrpl/protocol/ErrorCodes.h>
5
#include <xrpl/protocol/jss.h>
6
#include <xrpl/server/NetworkOPs.h>
7
8
namespace
xrpl
{
9
10
Json::Value
11
doConsensusInfo
(
RPC::JsonContext
& context)
12
{
13
Json::Value
ret(
Json::objectValue
);
14
15
ret[jss::info] = context.
netOps
.
getConsensusInfo
();
16
17
return
ret;
18
}
19
20
}
// namespace xrpl
Json::Value
Represents a JSON value.
Definition
json_value.h:130
xrpl::NetworkOPs::getConsensusInfo
virtual Json::Value getConsensusInfo()=0
Json::objectValue
@ objectValue
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:11
xrpl::RPC::Context::netOps
NetworkOPs & netOps
Definition
Context.h:23
xrpl::RPC::JsonContext
Definition
Context.h:33
Generated by
1.9.8