mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Tidy up NetworkOPs deadline timer usage
This commit is contained in:
@@ -40,14 +40,8 @@ NetworkOPs::NetworkOPs (LedgerMaster* pLedgerMaster)
|
||||
{
|
||||
}
|
||||
|
||||
void NetworkOPs::onDeadlineTimer (DeadlineTimer& timer)
|
||||
void NetworkOPs::processNetTimer ()
|
||||
{
|
||||
if (timer == m_clusterTimer)
|
||||
{
|
||||
doClusterReport();
|
||||
return;
|
||||
}
|
||||
|
||||
ScopedLock sl (getApp().getMasterLock ());
|
||||
|
||||
getApp().getLoadManager ().resetDeadlockDetector ();
|
||||
@@ -91,6 +85,18 @@ void NetworkOPs::onDeadlineTimer (DeadlineTimer& timer)
|
||||
mConsensus->timerEntry ();
|
||||
}
|
||||
|
||||
void NetworkOPs::onDeadlineTimer (DeadlineTimer& timer)
|
||||
{
|
||||
if (timer == m_netTimer)
|
||||
{
|
||||
processNetTimer ();
|
||||
}
|
||||
else if (timer == m_clusterTimer)
|
||||
{
|
||||
doClusterReport();
|
||||
}
|
||||
}
|
||||
|
||||
std::string NetworkOPs::strOperatingMode ()
|
||||
{
|
||||
static const char* paStatusToken [] =
|
||||
@@ -635,6 +641,7 @@ void NetworkOPs::setFeatureBlocked ()
|
||||
void NetworkOPs::setStateTimer ()
|
||||
{
|
||||
m_netTimer.setRecurringExpiration (LEDGER_GRANULARITY / 1000.0);
|
||||
|
||||
m_clusterTimer.setRecurringExpiration (10.0);
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,8 @@ public:
|
||||
InfoSub::pointer addRpcSub (const std::string& strUrl, InfoSub::ref rspEntry);
|
||||
|
||||
private:
|
||||
void onDeadlineTimer (DeadlineTimer&);
|
||||
void processNetTimer ();
|
||||
void onDeadlineTimer (DeadlineTimer& timer);
|
||||
|
||||
void setMode (OperatingMode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user