|
|
|
@ -104,8 +104,7 @@ namespace llarp
|
|
|
|
|
std::set<Introduction, CompareIntroTimestamp> intros;
|
|
|
|
|
if (const auto maybe =
|
|
|
|
|
GetCurrentIntroductionsWithFilter([now](const service::Introduction& intro) -> bool {
|
|
|
|
|
return not intro.ExpiresSoon(
|
|
|
|
|
now, path::default_lifetime - path::min_intro_lifetime);
|
|
|
|
|
return not intro.ExpiresSoon(now, path::intro_stale_threshold);
|
|
|
|
|
}))
|
|
|
|
|
{
|
|
|
|
|
intros.insert(maybe->begin(), maybe->end());
|
|
|
|
@ -734,13 +733,13 @@ namespace llarp
|
|
|
|
|
if (not m_PublishIntroSet)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
auto next_pub = m_state->m_LastPublishAttempt
|
|
|
|
|
+ (m_state->m_IntroSet.HasStaleIntros(
|
|
|
|
|
now, path::default_lifetime - path::intro_path_spread)
|
|
|
|
|
const auto lastEventAt = std::max(m_state->m_LastPublishAttempt, m_state->m_LastPublish);
|
|
|
|
|
const auto next_pub = lastEventAt
|
|
|
|
|
+ (m_state->m_IntroSet.HasStaleIntros(now, path::intro_stale_threshold)
|
|
|
|
|
? IntrosetPublishRetryCooldown
|
|
|
|
|
: IntrosetPublishInterval);
|
|
|
|
|
|
|
|
|
|
return now >= next_pub and m_LastIntrosetRegenAttempt + 1s <= now;
|
|
|
|
|
return now >= next_pub;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|