* Console: Use capability method for counting integrated peers

* Netdb: Speed up collection of all the floodfill peers by using
           PeerManager.getPeersByCapability()
  * PeerManager: Capability cleanups
This commit is contained in:
zzz
2011-07-21 15:34:23 +00:00
parent 046175d866
commit 395173613f
14 changed files with 104 additions and 93 deletions

View File

@ -183,7 +183,8 @@ class ProfileOrganizerRenderer {
}
buf.append("</table>");
buf.append("<h2><a name=\"flood\"></a>").append(_("Floodfill and Integrated Peers")).append("</h2>\n");
buf.append("<h2><a name=\"flood\"></a>").append(_("Floodfill and Integrated Peers"))
.append(" (").append(integratedPeers.size()).append(")</h2>\n");
buf.append("<table>");
buf.append("<tr>");
buf.append("<th class=\"smallhead\">").append(_("Peer")).append("</th>");

View File

@ -221,8 +221,8 @@ public class SummaryHelper extends HelperBase {
public int getWellIntegratedPeers() {
if (_context == null)
return 0;
else
return _context.profileOrganizer().countWellIntegratedPeers();
//return _context.profileOrganizer().countWellIntegratedPeers();
return _context.peerManager().getPeersByCapability(FloodfillNetworkDatabaseFacade.CAPABILITY_FLOODFILL).size();
}
/**
* How many peers the router ranks as failing.