Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Random noise on link lengths.

Link lengths are fairly identifiable - hopefully this will retain
the interesting properties of the data while making it more difficult to
connect to any given node.
  • Loading branch information...
commit 6219acefe25bfceaff6bf00e540b7c3504c730c3 1 parent cc7dc83
@Thynix authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/freenet/node/MHProbe.java
View
5 src/freenet/node/MHProbe.java
@@ -344,9 +344,8 @@ public void request(final Message message, final PeerNode source, final AsyncMes
double[] linkLengths = new double[degree()];
int i = 0;
for (PeerNode peer : node.peers.connectedPeers) {
- linkLengths[i++] = Math.min(Math.abs(peer.getLocation() - node.peers.node.getLocation()),
- 1.0 - Math.abs(peer.getLocation() - node.peers.node.getLocation()));
- //TODO: random noise or limit mantissa
+ linkLengths[i++] = randomNoise(Math.min(Math.abs(peer.getLocation() - node.peers.node.getLocation()),
+ 1.0 - Math.abs(peer.getLocation() - node.peers.node.getLocation())));
}
result = DMT.createMHProbeLinkLengths(identifier, linkLengths);
break;
Please sign in to comment.
Something went wrong with that request. Please try again.