mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +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)
|
void NetworkOPs::checkState(const boost::system::error_code& result)
|
||||||
{ // Network state machine
|
{ // Network state machine
|
||||||
|
|
||||||
if ((result == boost::asio::error::operation_aborted) || theConfig.RUN_STANDALONE)
|
if ((result == boost::asio::error::operation_aborted) || theConfig.RUN_STANDALONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setStateTimer();
|
setStateTimer();
|
||||||
|
|
||||||
|
ScopedLock(theApp->getMasterLock());
|
||||||
|
|
||||||
std::vector<Peer::pointer> peerList = theApp->getConnectionPool().getPeerVector();
|
std::vector<Peer::pointer> peerList = theApp->getConnectionPool().getPeerVector();
|
||||||
|
|
||||||
// do we have sufficient peers? If not, we are disconnected.
|
// 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.";
|
cLog(lsINFO) << "Node count (" << peerList.size() << ") is sufficient.";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mConsensus)
|
if (!mConsensus)
|
||||||
{
|
|
||||||
mConsensus->timerEntry();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
tryStartConsensus();
|
tryStartConsensus();
|
||||||
|
|
||||||
if (mConsensus)
|
if (mConsensus)
|
||||||
mConsensus->timerEntry();
|
mConsensus->timerEntry();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user