Also consider last publish; eliminate unwanted condition

We don't really carry about when the last regen was attempted, but
rather about when the last publish was attempted (or succeeded).
pull/1801/head
Jason Rhinelander 3 years ago committed by Jeff Becker
parent 8ba03de44e
commit 189c4bfba4
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -733,13 +733,14 @@ namespace llarp
if (not m_PublishIntroSet)
return false;
auto next_pub = m_state->m_LastPublishAttempt
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::default_lifetime - path::intro_path_spread)
? IntrosetPublishRetryCooldown
: IntrosetPublishInterval);
return now >= next_pub and m_LastIntrosetRegenAttempt + 1s <= now;
return now >= next_pub;
}
void

Loading…
Cancel
Save