From 4d27399ce33e7b9bdc409e7cabac8a3491f3ed46 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 13 Apr 2015 18:51:31 -0400 Subject: [PATCH] check profile for high bandwidth peer selection only --- NetDb.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NetDb.cpp b/NetDb.cpp index f07d17ba..e26440dd 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -895,7 +895,9 @@ namespace data [compatibleWith](std::shared_ptr router)->bool { return !router->IsHidden () && router != compatibleWith && - router->IsCompatible (*compatibleWith) && (router->GetCaps () & RouterInfo::eHighBandwidth); + router->IsCompatible (*compatibleWith) && + (router->GetCaps () & RouterInfo::eHighBandwidth) && + !router->GetProfile ()->IsBad (); }); } @@ -912,8 +914,7 @@ namespace data { if (i >= ind) { - if (!it.second->IsUnreachable () && filter (it.second) && - (j || !it.second->GetProfile ()->IsBad ())) + if (!it.second->IsUnreachable () && filter (it.second)) return it.second; } else