Report where the ledger publication stream is in server_info

This commit is contained in:
JoelKatz
2013-07-13 19:37:57 -07:00
parent 0fd5f98c9c
commit 1e26703684
2 changed files with 11 additions and 1 deletions

View File

@@ -1509,6 +1509,12 @@ Json::Value NetworkOPs::getServerInfo (bool human, bool admin)
info["validated_ledger"] = l;
else
info["closed_ledger"] = l;
Ledger::pointer lpPublished = getPublishedLedger ();
if (!lpPublished)
info["published_ledger"] = "none";
else if (lpPublished->getLedgerSeq() != lpClosed->getLedgerSeq())
info["published_ledger"] = lpPublished->getLedgerSeq();
}
return info;
@@ -2375,7 +2381,7 @@ void NetworkOPs::doClusterReport ()
node.set_reporttime(it->second.getReportTime());
node.set_nodeload(it->second.getLoadFee());
if (!it->second.getName().empty())
node.set_nodename(it->second.getName());
node.set_nodename(it->second.getName());
}
PackedMessage::pointer message = boost::make_shared<PackedMessage>(cluster, protocol::mtCLUSTER);

View File

@@ -80,6 +80,10 @@ public:
{
return mLedgerMaster->getValidatedLedger ();
}
Ledger::ref getPublishedLedger ()
{
return mLedgerMaster->getPublishedLedger ();
}
Ledger::ref getCurrentLedger ()
{
return mLedgerMaster->getCurrentLedger ();