swap intros should only swap intros

pull/334/head
Jeff Becker 5 years ago
parent eecc00211f
commit c7e100787b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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

Loading…
Cancel
Save