mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
only ping lokid if a service node
This commit is contained in:
parent
9214ecbc48
commit
e5f92eaa79
@ -131,6 +131,9 @@ namespace llarp
|
|||||||
virtual bool
|
virtual bool
|
||||||
Configure(Config *conf, llarp_nodedb *nodedb) = 0;
|
Configure(Config *conf, llarp_nodedb *nodedb) = 0;
|
||||||
|
|
||||||
|
virtual bool
|
||||||
|
IsServiceNode() const = 0;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
StartJsonRpc() = 0;
|
StartJsonRpc() = 0;
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ namespace llarp
|
|||||||
|
|
||||||
/// return true if we are running in service node mode
|
/// return true if we are running in service node mode
|
||||||
bool
|
bool
|
||||||
IsServiceNode() const;
|
IsServiceNode() const override;
|
||||||
|
|
||||||
void
|
void
|
||||||
Close();
|
Close();
|
||||||
|
@ -181,11 +181,14 @@ namespace llarp
|
|||||||
AsyncUpdatePubkeyList();
|
AsyncUpdatePubkeyList();
|
||||||
m_NextKeyUpdate = now + KeyUpdateInterval;
|
m_NextKeyUpdate = now + KeyUpdateInterval;
|
||||||
}
|
}
|
||||||
|
if(router->IsServiceNode())
|
||||||
|
{
|
||||||
if(now >= m_NextPing)
|
if(now >= m_NextPing)
|
||||||
{
|
{
|
||||||
AsyncLokiPing();
|
AsyncLokiPing();
|
||||||
m_NextPing = now + PingInterval;
|
m_NextPing = now + PingInterval;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Flush();
|
Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user