1#include <xrpld/app/main/Application.h>
2#include <xrpld/app/misc/LoadFeeTrack.h>
3#include <xrpld/core/TimeKeeper.h>
4#include <xrpld/overlay/Cluster.h>
5#include <xrpld/overlay/Overlay.h>
6#include <xrpld/rpc/Context.h>
8#include <xrpl/protocol/ErrorCodes.h>
9#include <xrpl/protocol/jss.h>
23 for (
auto& p : jvResult[jss::peers])
25 if (p.isMember(jss::track))
27 auto const s = p[jss::track].
asString();
30 p[
"sanity"] =
"insane";
31 else if (s ==
"unknown")
32 p[
"sanity"] =
"unknown";
44 [&cluster, now, ref, &self](
ClusterNode const& node) {
52 json[jss::tag] = node.
name();
55 json[jss::fee] =
static_cast<double>(node.
getLoadFee()) / ref;
std::string asString() const
Returns the unquoted string value.
virtual Overlay & overlay()=0
virtual LoadFeeTrack & getFeeTrack()=0
virtual TimeKeeper & timeKeeper()=0
virtual Cluster & cluster()=0
virtual std::pair< PublicKey, SecretKey > const & nodeIdentity()=0
std::string const & name() const
std::uint32_t getLoadFee() const
NetClock::time_point getReportTime() const
PublicKey const & identity() const
void for_each(std::function< void(ClusterNode const &)> func) const
Invokes the callback once for every cluster node.
std::uint32_t getLoadBase() const
virtual Json::Value json()=0
Return diagnostics on the status of all peers.
time_point now() const override
Returns the current time, using the server's clock.
@ objectValue
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 &)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.