mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
don't publish or use bad routers with endpoints
This commit is contained in:
parent
d4cb6808ec
commit
1882ffc016
1 changed files with 7 additions and 1 deletions
|
@ -113,6 +113,8 @@ namespace llarp
|
|||
m_IntroSet.I.clear();
|
||||
for(const auto& intro : I)
|
||||
{
|
||||
if(router->routerProfiling().IsBad(intro.router))
|
||||
continue;
|
||||
m_IntroSet.I.push_back(intro);
|
||||
}
|
||||
if(m_IntroSet.I.size() == 0)
|
||||
|
@ -1172,10 +1174,12 @@ namespace llarp
|
|||
, currentIntroSet(introset)
|
||||
|
||||
{
|
||||
auto& profiling = parent->m_Router->routerProfiling();
|
||||
updatingIntroSet = false;
|
||||
for(const auto intro : introset.I)
|
||||
{
|
||||
if(intro.expiresAt > m_NextIntro.expiresAt)
|
||||
if(intro.expiresAt > m_NextIntro.expiresAt
|
||||
&& !profiling.IsBad(intro.router))
|
||||
{
|
||||
m_NextIntro = intro;
|
||||
remoteIntro = intro;
|
||||
|
@ -1438,6 +1442,8 @@ namespace llarp
|
|||
{
|
||||
if(intro.ExpiresSoon(now))
|
||||
continue;
|
||||
if(router->routerProfiling().IsBad(intro.router))
|
||||
continue;
|
||||
auto itr = m_BadIntros.find(intro);
|
||||
if(itr == m_BadIntros.end() && intro.router == m_NextIntro.router)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue