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