when running as a client squelch warnings about snode status and make sure we connect out

pull/2021/head
Jeff Becker 2 years ago
parent 8f532dec89
commit 306d54e285
No known key found for this signature in database
GPG Key ID: 025C02EE3A092F2D

@ -1063,7 +1063,7 @@ namespace llarp
connectToNum = strictConnect;
}
if (now >= m_NextDecommissionWarn)
if (isSvcNode and now >= m_NextDecommissionWarn)
{
constexpr auto DecommissionWarnInterval = 5min;
if (auto registered = LooksRegistered(), funded = LooksFunded();
@ -1078,7 +1078,7 @@ namespace llarp
: "not fully staked");
m_NextDecommissionWarn = now + DecommissionWarnInterval;
}
else if (isSvcNode and TooFewPeers())
else if (TooFewPeers())
{
log::error(
logcat,
@ -1088,9 +1088,9 @@ namespace llarp
}
}
// if we need more sessions to routers and we are not a service node kicked from the network
// if we need more sessions to routers and we are not a service node kicked from the network or we are a client
// we shall connect out to others
if (connected < connectToNum and LooksFunded())
if (connected < connectToNum and (LooksFunded() or not isSvcNode))
{
size_t dlt = connectToNum - connected;
LogDebug("connecting to ", dlt, " random routers to keep alive");

Loading…
Cancel
Save