mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 00:15:51 +00:00
Enchance /crawl API endpoint with local server information (RIPD-1644):
The /crawl API endpoint allows developers to examine the structure of the XRP Ledger's overlay network. This commit adds additional information about the local server to the /crawl endpoint, making it possible for developers to create data-rich network-wide status dashboards. Related: - https://developers.ripple.com/peer-protocol.html - https://github.com/ripple/rippled-network-crawler
This commit is contained in:
committed by
Nik Bougalis
parent
ea76103d5f
commit
494724578a
@@ -190,13 +190,13 @@ ValidatorList::load (
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
ListDisposition
|
||||
ValidatorList::applyList (
|
||||
std::string const& manifest,
|
||||
std::string const& blob,
|
||||
std::string const& signature,
|
||||
std::uint32_t version)
|
||||
std::uint32_t version,
|
||||
std::string siteUri)
|
||||
{
|
||||
if (version != requiredListVersion)
|
||||
return ListDisposition::unsupported_version;
|
||||
@@ -215,6 +215,7 @@ ValidatorList::applyList (
|
||||
publisherLists_[pubKey].sequence = list["sequence"].asUInt ();
|
||||
publisherLists_[pubKey].expiration = TimeKeeper::time_point{
|
||||
TimeKeeper::duration{list["expiration"].asUInt()}};
|
||||
publisherLists_[pubKey].siteUri = std::move(siteUri);
|
||||
std::vector<PublicKey>& publisherList = publisherLists_[pubKey].list;
|
||||
|
||||
std::vector<PublicKey> oldList = publisherList;
|
||||
@@ -544,6 +545,7 @@ ValidatorList::getJson() const
|
||||
Json::Value& curr = jPublisherLists.append(Json::objectValue);
|
||||
curr[jss::pubkey_publisher] = strHex(p.first);
|
||||
curr[jss::available] = p.second.available;
|
||||
curr[jss::uri] = p.second.siteUri;
|
||||
if(p.second.expiration != TimeKeeper::time_point{})
|
||||
{
|
||||
curr[jss::seq] = static_cast<Json::UInt>(p.second.sequence);
|
||||
|
||||
Reference in New Issue
Block a user