mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Report server versions when crawling the overlay network
This commit is contained in:
committed by
Tom Ritchford
parent
a8db5650a5
commit
bc48d299b6
@@ -632,6 +632,9 @@ OverlayImpl::crawl()
|
|||||||
else
|
else
|
||||||
pv[jss::ip] = sp->getRemoteAddress().to_string();
|
pv[jss::ip] = sp->getRemoteAddress().to_string();
|
||||||
}
|
}
|
||||||
|
auto version = sp->getVersion ();
|
||||||
|
if (!version.empty ())
|
||||||
|
pv["version"] = version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return jv;
|
return jv;
|
||||||
|
|||||||
@@ -197,6 +197,15 @@ PeerImp::crawl() const
|
|||||||
return beast::ci_equal(iter->second, "public");
|
return beast::ci_equal(iter->second, "public");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
PeerImp::getVersion() const
|
||||||
|
{
|
||||||
|
if (hello_.has_fullversion ())
|
||||||
|
return hello_.fullversion ();
|
||||||
|
|
||||||
|
return std::string ();
|
||||||
|
}
|
||||||
|
|
||||||
Json::Value
|
Json::Value
|
||||||
PeerImp::json()
|
PeerImp::json()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -237,6 +237,10 @@ public:
|
|||||||
return publicKey_;
|
return publicKey_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return the version of rippled that the peer is running, if reported. */
|
||||||
|
std::string
|
||||||
|
getVersion() const;
|
||||||
|
|
||||||
Json::Value
|
Json::Value
|
||||||
json() override;
|
json() override;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user