1#include <xrpld/app/main/Application.h>
2#include <xrpld/core/TimeKeeper.h>
3#include <xrpld/overlay/Cluster.h>
4#include <xrpld/overlay/ClusterNode.h>
5#include <xrpld/overlay/Overlay.h>
6#include <xrpld/rpc/Context.h>
8#include <xrpl/basics/chrono.h>
9#include <xrpl/json/json_value.h>
10#include <xrpl/protocol/PublicKey.h>
11#include <xrpl/protocol/jss.h>
12#include <xrpl/protocol/tokens.h>
13#include <xrpl/server/LoadFeeTrack.h>
29 for (
auto& p : jvResult[jss::peers])
31 if (p.isMember(jss::track))
33 auto const s = p[jss::track].asString();
37 p[
"sanity"] =
"insane";
39 else if (s ==
"unknown")
41 p[
"sanity"] =
"unknown";
virtual std::pair< PublicKey, SecretKey > const & nodeIdentity()=0
std::uint32_t getLoadFee() const
NetClock::time_point getReportTime() const
PublicKey const & identity() const
std::string const & name() const
void forEach(std::function< void(ClusterNode const &)> func) const
Invokes the callback once for every cluster node.
static std::uint32_t getLoadBase()
std::chrono::time_point< NetClock > time_point
virtual json::Value json()=0
Return diagnostics on the status of all peers.
virtual LoadFeeTrack & getFeeTrack()=0
virtual Cluster & getCluster()=0
virtual Overlay & getOverlay()=0
virtual TimeKeeper & getTimeKeeper()=0
time_point now() const override
Returns the current time, using the server's clock.
JSON (JavaScript Object Notation).
@ Object
object value (collection of name/value pairs).
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
json::Value doPeers(RPC::JsonContext &context)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.