20 #include <ripple/app/misc/LoadFeeTrack.h>
21 #include <ripple/core/TimeKeeper.h>
22 #include <ripple/net/RPCErr.h>
23 #include <ripple/overlay/Cluster.h>
24 #include <ripple/overlay/Overlay.h>
25 #include <ripple/protocol/ErrorCodes.h>
26 #include <ripple/protocol/jss.h>
27 #include <ripple/rpc/Context.h>
44 for (
auto& p : jvResult[jss::peers])
46 if (p.isMember(jss::track))
48 auto const s = p[jss::track].
asString();
51 p[
"sanity"] =
"insane";
52 else if (s ==
"unknown")
53 p[
"sanity"] =
"unknown";
65 [&cluster, now, ref, &
self](
ClusterNode const& node) {
73 json[jss::tag] = node.
name();
76 json[jss::fee] =
static_cast<double>(node.
getLoadFee()) / ref;
virtual Cluster & cluster()=0
Json::Value rpcError(int iError)
std::string const & name() const
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
std::uint32_t getLoadBase() const
virtual TimeKeeper & timeKeeper()=0
Json::Value doPeers(RPC::JsonContext &)
@ rpcREPORTING_UNSUPPORTED
virtual LoadFeeTrack & getFeeTrack()=0
@ objectValue
object value (collection of name/value pairs).
virtual Config & config()=0
virtual std::pair< PublicKey, SecretKey > const & nodeIdentity()=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual Json::Value json()=0
Return diagnostics on the status of all peers.
virtual time_point now() const override=0
Returns the estimate of wall time, in network time.
virtual Overlay & overlay()=0
void for_each(std::function< void(ClusterNode const &)> func) const
Invokes the callback once for every cluster node.
NetClock::time_point getReportTime() const
PublicKey const & identity() const
std::uint32_t getLoadFee() const
std::string asString() const
Returns the unquoted string value.