mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Bugfix for moving from connected to tracking state.
Skeleting for getting Json info from consensus engine.
This commit is contained in:
@@ -956,4 +956,12 @@ void LedgerConsensus::endConsensus()
|
||||
{
|
||||
theApp->getOPs().endConsensus(mHaveCorrectLCL);
|
||||
}
|
||||
|
||||
Json::Value LedgerConsensus::getJson()
|
||||
{
|
||||
Json::Value ret(Json::objectValue);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/unordered/unordered_map.hpp>
|
||||
|
||||
#include "../json/value.h"
|
||||
|
||||
#include "key.h"
|
||||
#include "Transaction.h"
|
||||
#include "LedgerAcquire.h"
|
||||
@@ -142,6 +144,7 @@ public:
|
||||
LedgerConsensus(const uint256& prevLCLHash, Ledger::pointer previousLedger, uint32 closeTime);
|
||||
|
||||
int startup();
|
||||
Json::Value getJson();
|
||||
|
||||
Ledger::pointer peekPreviousLedger() { return mPreviousLedger; }
|
||||
uint256 getLCL() { return mPrevLedgerHash; }
|
||||
|
||||
@@ -604,12 +604,6 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, uint
|
||||
if (!theApp->isNew(s.getSHA512Half()))
|
||||
return false;
|
||||
|
||||
if ((mMode != omFULL) && (mMode != omTRACKING))
|
||||
{
|
||||
Log(lsINFO) << "Received proposal when not full/tracking: " << mMode;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mConsensus)
|
||||
{ // FIXME: CLC
|
||||
Log(lsWARNING) << "Received proposal when full but not during consensus window";
|
||||
@@ -754,6 +748,9 @@ Json::Value NetworkOPs::getServerInfo()
|
||||
if (!theConfig.VALIDATION_SEED.isValid()) info["serverState"] = "none";
|
||||
else info["validationPKey"] = NewcoinAddress::createNodePublic(theConfig.VALIDATION_SEED).humanNodePublic();
|
||||
|
||||
if (mConsensus)
|
||||
info["consensus"] = mConsensus->getJson();
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user