diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index 59b1d83f03..6d61f5216e 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -431,7 +431,7 @@ void LedgerConsensus::statePreClose() { // it is time to close the ledger Log(lsINFO) << "CLC: closing ledger"; mState = lcsESTABLISH; - mConsensusStartTime = boost::posix_time::second_clock::universal_time(); + mConsensusStartTime = boost::posix_time::microsec_clock::universal_time(); mCloseTime = theApp->getOPs().getCloseTimeNC(); theApp->getOPs().setLastCloseNetTime(mCloseTime); statusChange(newcoin::neCLOSING_LEDGER, *mPreviousLedger); @@ -492,7 +492,7 @@ void LedgerConsensus::timerEntry() } mCurrentMSeconds = (mCloseTime == 0) ? 0 : - (boost::posix_time::second_clock::universal_time() - mConsensusStartTime).total_milliseconds(); + (boost::posix_time::microsec_clock::universal_time() - mConsensusStartTime).total_milliseconds(); mClosePercent = mCurrentMSeconds * 100 / mPreviousMSeconds; switch (mState) diff --git a/src/LedgerTiming.cpp b/src/LedgerTiming.cpp index 369e559a0c..ce737c2a63 100644 --- a/src/LedgerTiming.cpp +++ b/src/LedgerTiming.cpp @@ -33,7 +33,7 @@ int ContinuousLedgerTiming::shouldClose( { // no transactions so far this interval if (proposersClosed > (previousProposers / 4)) // did we miss a transaction? { - Log(lsTRACE) << "no transactions, many proposers: now (" << proposersClose << "closed, " + Log(lsTRACE) << "no transactions, many proposers: now (" << proposersClosed << "closed, " << previousProposers << " before)"; return currentMSeconds; } diff --git a/src/NetworkOPs.cpp b/src/NetworkOPs.cpp index 2f7a4fca87..29531461bb 100644 --- a/src/NetworkOPs.cpp +++ b/src/NetworkOPs.cpp @@ -33,7 +33,7 @@ boost::posix_time::ptime NetworkOPs::getNetworkTimePT() { int offset = 0; theApp->getSystemTimeOffset(offset); - return boost::posix_time::second_clock::universal_time() + boost::posix_time::seconds(offset); + return boost::posix_time::microsec_clock::universal_time() + boost::posix_time::seconds(offset); } uint32 NetworkOPs::getNetworkTimeNC() @@ -634,6 +634,7 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, uint if ((!mConsensus) && (mMode == omFULL)) { uint256 networkClosed; + std::vector peerList = theApp->getConnectionPool().getPeerVector(); bool ledgerChange = checkLastClosedLedger(peerList, networkClosed); if (!ledgerChange) {