mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
By controlling when we create a LedgerConsensus object, we can control when we switch our view
of the network's LCL.
This commit is contained in:
@@ -318,16 +318,8 @@ void NetworkOPs::checkState(const boost::system::error_code& result)
|
||||
// check if the ledger is bad enough to go to omTRACKING
|
||||
}
|
||||
|
||||
// uint32 defaultClose = theApp->getMasterLedger().getCurrentLedger()->getCloseTimeNC();
|
||||
// uint32 now = theApp->getOPs().getNetworkTimeNC();
|
||||
if (!mConsensus)
|
||||
{ // if now is past the ledger's default close time or there are transactions in the current ledger, close
|
||||
if ((theApp->getOPs().getNetworkTimeNC() > theApp->getMasterLedger().getCurrentLedger()->getCloseTimeNC())
|
||||
|| (!!theApp->getMasterLedger().getCurrentLedger()->getTransHash()))
|
||||
{
|
||||
beginConsensus(networkClosed, theApp->getMasterLedger().getCurrentLedger());
|
||||
}
|
||||
}
|
||||
if ((!mConsensus) && (mMode != omDISCONNECTED))
|
||||
beginConsensus(networkClosed, theApp->getMasterLedger().getCurrentLedger());
|
||||
if (mConsensus)
|
||||
mConsensus->timerEntry();
|
||||
setStateTimer();
|
||||
|
||||
Reference in New Issue
Block a user