fix warning on hop selection

pull/448/head
Jeff Becker 5 years ago
parent 127cfbbfbc
commit 9e531c026c
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1175,12 +1175,10 @@ namespace llarp
, currentIntroSet(introset)
{
auto& profiling = parent->m_Router->routerProfiling();
updatingIntroSet = false;
for(const auto intro : introset.I)
{
if(intro.expiresAt > m_NextIntro.expiresAt
&& !profiling.IsBad(intro.router))
if(intro.expiresAt > m_NextIntro.expiresAt)
{
m_NextIntro = intro;
remoteIntro = intro;
@ -1848,13 +1846,21 @@ namespace llarp
llarp::path::PathRole roles)
{
if(m_NextIntro.router.IsZero())
{
llarp::LogError("intro is not set, cannot select hops");
return false;
}
if(hop == numHops - 1)
{
if(db->Get(m_NextIntro.router, cur))
{
return true;
}
else if(router->routerProfiling().IsBad(m_NextIntro.router))
{
llarp::LogError("bad intro chosen, not selecting hop");
return false;
}
else
{
// we don't have it?

Loading…
Cancel
Save