NetDb: Add advanced lookup form

Fix /16 and /8 lookup
Fix tab highlighted for all lookups
Add sybil points for banlist
This commit is contained in:
zzz
2016-11-26 15:11:06 +00:00
parent f6778c573a
commit 5a87c232ea
4 changed files with 48 additions and 11 deletions

View File

@@ -75,6 +75,7 @@ class SybilRenderer {
private static final double POINTS_BAD_VERSION = 50.0;
private static final double POINTS_UNREACHABLE = 4.0;
private static final double POINTS_NEW = 4.0;
private static final double POINTS_BANLIST = 25.0;
public SybilRenderer(RouterContext ctx) {
_context = ctx;
@@ -638,6 +639,8 @@ class SybilRenderer {
RateAverages ra = RateAverages.getTemp();
for (RouterInfo info : ris) {
Hash h = info.getHash();
if (_context.banlist().isBanlisted(h))
addPoints(points, h, POINTS_BANLIST, "Banlisted");
PeerProfile prof = _context.profileOrganizer().getProfileNonblocking(h);
if (prof != null) {
long heard = prof.getFirstHeardAbout();