swap intros should only swap intros

pull/334/head
Jeff Becker 6 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() Endpoint::OutboundContext::SwapIntros()
{ {
remoteIntro = m_NextIntro; remoteIntro = m_NextIntro;
// prepare next intro m_DataHandler->PutIntroFor(currentConvoTag, remoteIntro);
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;
}
}
} }
bool bool

Loading…
Cancel
Save