1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Merge pull request #334 from majestrate/fix-convotag-issue

swap intros should only swap intros
This commit is contained in:
Jeff 2019-02-21 13:08:25 -05:00 committed by GitHub
commit 563cdf2c7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1142,29 +1142,7 @@ namespace llarp
Endpoint::OutboundContext::SwapIntros()
{
remoteIntro = m_NextIntro;
// prepare next intro
auto now = Now();
for(const auto& intro : currentIntroSet.I)
{
if(intro.ExpiresSoon(now))
continue;
if(m_BadIntros.find(intro) == m_BadIntros.end()
&& remoteIntro.router == intro.router)
{
m_NextIntro = intro;
return;
}
}
for(const auto& intro : currentIntroSet.I)
{
if(intro.ExpiresSoon(now))
continue;
if(m_BadIntros.find(intro) == m_BadIntros.end())
{
m_NextIntro = intro;
return;
}
}
m_DataHandler->PutIntroFor(currentConvoTag, remoteIntro);
}
bool