Skip to content

Commit

Permalink
adjustments to dhtInCache write
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2579 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Sep 14, 2006
1 parent 9ecf7f0 commit 5c2f30e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/de/anomic/yacy/yacyDHTAction.java
Expand Up @@ -232,6 +232,7 @@ public void processPeerPing(yacySeed peer) {
}

public static boolean shallBeOwnWord(String wordhash) {
if (yacyCore.seedDB.mySeed.isPotential()) return false;
final double distance = dhtDistance(yacyCore.seedDB.mySeed.hash, wordhash);
final double max = 1.2 / yacyCore.seedDB.sizeConnected();
//System.out.println("Distance for " + wordhash + ": " + distance + "; max is " + max);
Expand Down
6 changes: 6 additions & 0 deletions source/de/anomic/yacy/yacySeed.java
Expand Up @@ -441,12 +441,18 @@ public boolean getFlagAcceptCitationReference() {
public void setUnusedFlags() {
for (int i = 4; i < 24; i++) setFlag(i, true);
}
public boolean isPotential() {
return isVirgin() || isJunior();
}
public boolean isVirgin() {
return get(PEERTYPE, "").equals(PEERTYPE_VIRGIN);
}
public boolean isJunior() {
return get(PEERTYPE, "").equals(PEERTYPE_JUNIOR);
}
public boolean isActive() {
return isSenior() || isPrincipal();
}
public boolean isSenior() {
return get(PEERTYPE, "").equals(PEERTYPE_SENIOR);
}
Expand Down

0 comments on commit 5c2f30e

Please sign in to comment.