|
|
|
@ -862,11 +862,11 @@ namespace llarp
|
|
|
|
|
if (IsServiceNode())
|
|
|
|
|
{
|
|
|
|
|
LogInfo(NumberOfConnectedClients(), " client connections");
|
|
|
|
|
LogInfo(_rc.Age(now), " since we last updated our RC");
|
|
|
|
|
LogInfo(_rc.TimeUntilExpires(now), " until our RC expires");
|
|
|
|
|
LogInfo(ToString(_rc.Age(now)), " since we last updated our RC");
|
|
|
|
|
LogInfo(ToString(_rc.TimeUntilExpires(now)), " until our RC expires");
|
|
|
|
|
}
|
|
|
|
|
if (m_LastStatsReport > 0s)
|
|
|
|
|
LogInfo(now - m_LastStatsReport, " last reported stats");
|
|
|
|
|
LogInfo(ToString(now - m_LastStatsReport), " last reported stats");
|
|
|
|
|
m_LastStatsReport = now;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -880,7 +880,7 @@ namespace llarp
|
|
|
|
|
if (const auto delta = now - _lastTick; _lastTick != 0s and delta > TimeskipDetectedDuration)
|
|
|
|
|
{
|
|
|
|
|
// we detected a time skip into the futre, thaw the network
|
|
|
|
|
LogWarn("Timeskip of ", delta, " detected. Resetting network state");
|
|
|
|
|
LogWarn("Timeskip of ", ToString(delta), " detected. Resetting network state");
|
|
|
|
|
Thaw();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -888,32 +888,30 @@ namespace llarp
|
|
|
|
|
{
|
|
|
|
|
std::string status;
|
|
|
|
|
auto out = std::back_inserter(status);
|
|
|
|
|
out = fmt::format_to(out, "WATCHDOG=1\nSTATUS=v{}", llarp::VERSION_STR);
|
|
|
|
|
fmt::format_to(out, "WATCHDOG=1\nSTATUS=v{}", llarp::VERSION_STR);
|
|
|
|
|
if (IsServiceNode())
|
|
|
|
|
{
|
|
|
|
|
out = fmt::format_to(
|
|
|
|
|
fmt::format_to(
|
|
|
|
|
out,
|
|
|
|
|
" snode | known/svc/clients: {}/{}/{}",
|
|
|
|
|
nodedb()->NumLoaded(),
|
|
|
|
|
NumberOfConnectedRouters(),
|
|
|
|
|
NumberOfConnectedClients());
|
|
|
|
|
out = fmt::format_to(
|
|
|
|
|
fmt::format_to(
|
|
|
|
|
out,
|
|
|
|
|
" | {} active paths | block {} ",
|
|
|
|
|
pathContext().CurrentTransitPaths(),
|
|
|
|
|
(m_lokidRpcClient ? m_lokidRpcClient->BlockHeight() : 0));
|
|
|
|
|
out = fmt::format_to(
|
|
|
|
|
auto maybe_last = _rcGossiper.LastGossipAt();
|
|
|
|
|
fmt::format_to(
|
|
|
|
|
out,
|
|
|
|
|
" | gossip: (next/last) {} / ",
|
|
|
|
|
time_delta<std::chrono::seconds>{_rcGossiper.NextGossipAt()});
|
|
|
|
|
if (auto maybe = _rcGossiper.LastGossipAt())
|
|
|
|
|
out = fmt::format_to(out, "{}", time_delta<std::chrono::seconds>{*maybe});
|
|
|
|
|
else
|
|
|
|
|
out = fmt::format_to(out, "never");
|
|
|
|
|
" | gossip: (next/last) {} / {}",
|
|
|
|
|
short_time_from_now(_rcGossiper.NextGossipAt()),
|
|
|
|
|
maybe_last ? short_time_from_now(*maybe_last) : "never");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
out = fmt::format_to(
|
|
|
|
|
fmt::format_to(
|
|
|
|
|
out,
|
|
|
|
|
" client | known/connected: {}/{}",
|
|
|
|
|
nodedb()->NumLoaded(),
|
|
|
|
@ -921,7 +919,7 @@ namespace llarp
|
|
|
|
|
|
|
|
|
|
if (auto ep = hiddenServiceContext().GetDefault())
|
|
|
|
|
{
|
|
|
|
|
out = fmt::format_to(
|
|
|
|
|
fmt::format_to(
|
|
|
|
|
out,
|
|
|
|
|
" | paths/endpoints {}/{}",
|
|
|
|
|
pathContext().CurrentOwnedPaths(),
|
|
|
|
@ -929,7 +927,7 @@ namespace llarp
|
|
|
|
|
|
|
|
|
|
if (auto success_rate = ep->CurrentBuildStats().SuccessRatio(); success_rate < 0.5)
|
|
|
|
|
{
|
|
|
|
|
out = fmt::format_to(
|
|
|
|
|
fmt::format_to(
|
|
|
|
|
out, " [ !!! Low Build Success Rate ({:.1f}%) !!! ]", (100.0 * success_rate));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|