Author: nextgens
Date: 2006-05-29 16:42:54 +0000 (Mon, 29 May 2006)
New Revision: 8922
Modified:
trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
Log:
Updated PeerManagerUserAlert
Modified: trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
2006-05-29 16:05:42 UTC (rev 8921)
+++ trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
2006-05-29 16:42:54 UTC (rev 8922)
@@ -32,16 +32,18 @@
public String getText() {
String s;
if(peers == 0) {
- s = "This node has no peers to connect to, therefore it will
not " +
- "be able to function normally. Ideally you
should connect to peers run by people you know " +
- "(if you are paranoid, then people you trust;
if not, then at least people you've talked to)";
- String end = " log on to irc.freenode.net channel #freenet-refs
and ask around for somebody to connect to";
- if(n.isTestnetEnabled())
- s += ", but since this is a testnet node, we suggest
that you " + end + ".";
- else
- s += ". You could " + end + ", but remember that you
are vulnerable to " +
- "those you are directly connected to.
(This is especially true in this early alpha of Freenet 0.7...)";
- } else if(conns == 0) {
+ s = "This node has no peers to connect to, therefore it
will not " +
+ "be able to function normally. Ideally you should
connect to peers run by people you know " +
+ "(if you are paranoid, then people you trust; if not,
then at least people you've talked to)";
+ String end = " log on to irc.freenode.net channel
#freenet-refs and ask around for somebody to connect to";
+ if(n.isTestnetEnabled())
+ s += ", but since this is a testnet node, we
suggest that you " + end + ".";
+ else
+ s += ". You could " + end + ", but remember
that you are vulnerable to " +
+ "those you are directly connected to. (This is
especially true in this early alpha of Freenet 0.7...)";
+ }else if(peers-conns >= 20){
+ s = "This node has too many disconnected peers : it
will have a negative impact on your performances! Consider \"cleaning up\" your
peer list.";
+ }else if(conns == 0) {
s = "This node has not been able to connect to any
other nodes so far; it will not be able to function normally. " +
"Hopefully some of your peers will connect soon; if
not, try to get some more peers.";
} else if(conns == 1) {
@@ -52,12 +54,14 @@
s = "This node has only two connections. Performance
and security will not be very good, and your node is not doing any routing for
other nodes. " +
"Your node is embedded like a 'chain' in the network
and does not contribute to the network's health." +
"Try to get at least 3 connected peers at any given
time.";
+ }else if(conns >= 12) {
+ s = "This node many connections. We don't encourage
such a behaviour : Ubernodes are hurting the network.";
} else throw new IllegalArgumentException("Not valid");
return s;
}
public short getPriorityClass() {
- if(peers == 0 || conns == 0)
+ if(peers == 0 || conns == 0 || conns >= 20)
return UserAlert.CRITICAL_ERROR;
return UserAlert.ERROR;
}