only ping lokid if a service node

pull/1020/head
Jeff Becker 5 years ago
parent 9214ecbc48
commit e5f92eaa79
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -131,6 +131,9 @@ namespace llarp
virtual bool
Configure(Config *conf, llarp_nodedb *nodedb) = 0;
virtual bool
IsServiceNode() const = 0;
virtual bool
StartJsonRpc() = 0;

@ -323,7 +323,7 @@ namespace llarp
/// return true if we are running in service node mode
bool
IsServiceNode() const;
IsServiceNode() const override;
void
Close();

@ -181,11 +181,14 @@ namespace llarp
AsyncUpdatePubkeyList();
m_NextKeyUpdate = now + KeyUpdateInterval;
}
if(router->IsServiceNode())
{
if(now >= m_NextPing)
{
AsyncLokiPing();
m_NextPing = now + PingInterval;
}
}
Flush();
}

Loading…
Cancel
Save