fix good/bad calculation
This commit is contained in:
@ -129,14 +129,14 @@ class FloodfillPeerSelector extends PeerSelector {
|
|||||||
} else {
|
} else {
|
||||||
PeerProfile prof = _context.profileOrganizer().getProfile(entry);
|
PeerProfile prof = _context.profileOrganizer().getProfile(entry);
|
||||||
if (prof != null && prof.getDBHistory() != null
|
if (prof != null && prof.getDBHistory() != null
|
||||||
&& now - prof.getDBHistory().getLastStoreFailed() > NO_FAIL_STORE_GOOD
|
&& now - prof.getDBHistory().getLastStoreFailed() < now - NO_FAIL_STORE_GOOD
|
||||||
&& now - prof.getDBHistory().getLastLookupFailed() > NO_FAIL_LOOKUP_GOOD) {
|
&& now - prof.getDBHistory().getLastLookupFailed() < now - NO_FAIL_LOOKUP_GOOD) {
|
||||||
// good
|
// good
|
||||||
rv.add(entry);
|
rv.add(entry);
|
||||||
found++;
|
found++;
|
||||||
} else if (prof != null && prof.getDBHistory() != null
|
} else if (prof != null && prof.getDBHistory() != null
|
||||||
&& now - prof.getDBHistory().getLastStoreFailed() > NO_FAIL_STORE_OK
|
&& now - prof.getDBHistory().getLastStoreFailed() < now - NO_FAIL_STORE_OK
|
||||||
&& now - prof.getDBHistory().getLastLookupFailed() > NO_FAIL_LOOKUP_OK) {
|
&& now - prof.getDBHistory().getLastLookupFailed() < now - NO_FAIL_LOOKUP_OK) {
|
||||||
okff.add(entry);
|
okff.add(entry);
|
||||||
} else {
|
} else {
|
||||||
badff.add(entry);
|
badff.add(entry);
|
||||||
|
Reference in New Issue
Block a user