diff --git a/src/kademlia/message/StoreContentMessage.java b/src/kademlia/message/StoreContentMessage.java index 9a7ce5d..edd8075 100644 --- a/src/kademlia/message/StoreContentMessage.java +++ b/src/kademlia/message/StoreContentMessage.java @@ -3,7 +3,6 @@ package kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import kademlia.dht.KadContent; import kademlia.dht.StorageEntry; import kademlia.node.Node; import kademlia.util.serializer.JsonSerializer; diff --git a/src/kademlia/operation/BucketRefreshOperation.java b/src/kademlia/operation/BucketRefreshOperation.java index 3282a7c..2dcf97e 100644 --- a/src/kademlia/operation/BucketRefreshOperation.java +++ b/src/kademlia/operation/BucketRefreshOperation.java @@ -53,7 +53,7 @@ public class BucketRefreshOperation implements Operation { try { - new NodeLookupOperation(server, localNode, localNode.getNode().getNodeId(), BucketRefreshOperation.this.config).execute(); + new NodeLookupOperation(server, localNode, current, BucketRefreshOperation.this.config).execute(); } catch (IOException e) { diff --git a/src/kademlia/operation/ContentRefreshOperation.java b/src/kademlia/operation/ContentRefreshOperation.java index 8fac0d8..2ad54c9 100644 --- a/src/kademlia/operation/ContentRefreshOperation.java +++ b/src/kademlia/operation/ContentRefreshOperation.java @@ -73,7 +73,7 @@ public class ContentRefreshOperation implements Operation for (Node n : closestNodes) { /*We don't need to again store the content locally, it's already here*/ - if (!n.equals(this.localNode)) + if (!n.equals(this.localNode.getNode())) { /* Send a contentstore operation to the K-Closest nodes */ this.server.sendMessage(n, msg, null); @@ -83,7 +83,7 @@ public class ContentRefreshOperation implements Operation /* Delete any content on this node that this node is not one of the K-Closest nodes to */ try { - if (!closestNodes.contains(this.localNode)) + if (!closestNodes.contains(this.localNode.getNode())) { this.dht.remove(e); }