mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanup resynch logic.
This commit is contained in:
@@ -888,11 +888,10 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
ssw.write(Log(lsTRACE).ref(), p);
|
||||
}
|
||||
#endif
|
||||
// FIXME: If necessary, change state to TRACKING/FULL
|
||||
}
|
||||
|
||||
void LedgerConsensus::endConsensus()
|
||||
{
|
||||
theApp->getOPs().endConsensus();
|
||||
theApp->getOPs().endConsensus(mHaveCorrectLCL);
|
||||
}
|
||||
// vim:ts=4
|
||||
|
||||
@@ -643,7 +643,7 @@ void NetworkOPs::mapComplete(const uint256& hash, SHAMap::pointer map)
|
||||
mConsensus->mapComplete(hash, map, true);
|
||||
}
|
||||
|
||||
void NetworkOPs::endConsensus()
|
||||
void NetworkOPs::endConsensus(bool correctLCL)
|
||||
{
|
||||
uint256 deadLedger = theApp->getMasterLedger().getClosedLedger()->getParentHash();
|
||||
Log(lsTRACE) << "Ledger " << deadLedger.GetHex() << " is now dead";
|
||||
@@ -655,6 +655,8 @@ void NetworkOPs::endConsensus()
|
||||
(*it)->cycleStatus();
|
||||
}
|
||||
mConsensus = boost::shared_ptr<LedgerConsensus>();
|
||||
if (correctLCL && (mMode == omCONNECTED))
|
||||
setMode(omTRACKING);
|
||||
}
|
||||
|
||||
void NetworkOPs::setMode(OperatingMode om)
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
void switchLastClosedLedger(Ledger::pointer newLedger); // Used for the "jump" case
|
||||
bool checkLastClosedLedger(const std::vector<Peer::pointer>&, uint256& networkClosed);
|
||||
int beginConsensus(const uint256& networkClosed, Ledger::pointer closingLedger);
|
||||
void endConsensus();
|
||||
void endConsensus(bool correctLCL);
|
||||
void setStateTimer();
|
||||
void newLCL(int proposers, int convergeTime, const uint256& ledgerHash);
|
||||
int getPreviousProposers() { return mLastCloseProposers; }
|
||||
|
||||
Reference in New Issue
Block a user