X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4ff58d2d07010304fcec536391550de4ff5e0682..f0837fbf862b4bbf7f074314f95df143c6285cef:/examples/java/dht/kademlia/Node.java diff --git a/examples/java/dht/kademlia/Node.java b/examples/java/dht/kademlia/Node.java index ba7bee29a8..4e46ba08c2 100644 --- a/examples/java/dht/kademlia/Node.java +++ b/examples/java/dht/kademlia/Node.java @@ -109,12 +109,10 @@ public class Node extends Process { } else { Task task = comm.getTask(); if (task instanceof FindNodeAnswerTask) { - answerGot = true; //Retrieve the node list and ping them FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task; Answer answer = answerTask.getAnswer(); answerGot = true; - //answersGotten++; if (answer.getDestinationId() == this.id) { //Ping everyone in the list for (Contact c : answer.getNodes()) { @@ -155,8 +153,8 @@ public class Node extends Process { public boolean findNode(int destination, boolean counts) { int queries; int answers; - int nodesAdded = 0; - boolean destinationFound = false; + int nodesAdded; + boolean destinationFound; int steps = 0; double timeBeginReceive; double timeout;