Bugfix for moving from connected to tracking state.

Skeleting for getting Json info from consensus engine.
This commit is contained in:
JoelKatz
2012-08-06 03:40:52 -07:00
parent 85c0293673
commit efa3653b80
3 changed files with 14 additions and 6 deletions

View File

@@ -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

View File

@@ -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; }

View File

@@ -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;
}