mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 22:15:52 +00:00
Fix crash when using open ledger to take initial position.
This commit is contained in:
@@ -595,10 +595,14 @@ public:
|
||||
|
||||
void NetworkOPs::checkState(const boost::system::error_code& result)
|
||||
{ // Network state machine
|
||||
|
||||
if ((result == boost::asio::error::operation_aborted) || theConfig.RUN_STANDALONE)
|
||||
return;
|
||||
|
||||
setStateTimer();
|
||||
|
||||
ScopedLock(theApp->getMasterLock());
|
||||
|
||||
std::vector<Peer::pointer> peerList = theApp->getConnectionPool().getPeerVector();
|
||||
|
||||
// do we have sufficient peers? If not, we are disconnected.
|
||||
@@ -618,12 +622,9 @@ void NetworkOPs::checkState(const boost::system::error_code& result)
|
||||
cLog(lsINFO) << "Node count (" << peerList.size() << ") is sufficient.";
|
||||
}
|
||||
|
||||
if (mConsensus)
|
||||
{
|
||||
mConsensus->timerEntry();
|
||||
return;
|
||||
}
|
||||
tryStartConsensus();
|
||||
if (!mConsensus)
|
||||
tryStartConsensus();
|
||||
|
||||
if (mConsensus)
|
||||
mConsensus->timerEntry();
|
||||
}
|
||||
@@ -632,7 +633,7 @@ void NetworkOPs::tryStartConsensus()
|
||||
{
|
||||
uint256 networkClosed;
|
||||
bool ledgerChange = checkLastClosedLedger(theApp->getConnectionPool().getPeerVector(), networkClosed);
|
||||
if(networkClosed.isZero())
|
||||
if (networkClosed.isZero())
|
||||
return;
|
||||
|
||||
// WRITEME: Unless we are in omFULL and in the process of doing a consensus,
|
||||
|
||||
Reference in New Issue
Block a user