Skip to content

Commit

Permalink
Changes to test
Browse files Browse the repository at this point in the history
  • Loading branch information
DrBrad committed May 23, 2024
1 parent 67f727e commit accd535
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file modified out/test/Kad4/unet/kad4/example/Main.class
Binary file not shown.
12 changes: 6 additions & 6 deletions test/unet/kad4/example/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ public static void main(String[] args){
try{
Kademlia k = new Kademlia("Kademlia");
k.getRoutingTable().setSecureOnly(false);
k.join(6881, InetAddress.getByName("router.bittorrent.com"), 6881);
//k.bind(8070);
/*
//k.join(6881, InetAddress.getByName("router.bittorrent.com"), 6881);
k.bind(8070);

Kademlia k2 = new Kademlia();
k2.getRoutingTable().setSecureOnly(false);
k2.join(8070, InetAddress.getLoopbackAddress(), 8075);
*/
k2.join(8075, InetAddress.getLoopbackAddress(), 8070);


while(true){
Thread.sleep(10000);
System.out.println("CONSENSUS-1: "+k.getRoutingTable().getDerivedUID()+" "+k.getRoutingTable().getConsensusExternalAddress().getHostAddress()+" "+k.getRoutingTable().getAllNodes().size());
//System.out.println("CONSENSUS-2: "+k2.getRoutingTable().getDerivedUID()+" "+k2.getRoutingTable().getConsensusExternalAddress().getHostAddress()+" "+k2.getRoutingTable().getAllNodes().size());
System.out.println("CONSENSUS-2: "+k2.getRoutingTable().getDerivedUID()+" "+k2.getRoutingTable().getConsensusExternalAddress().getHostAddress()+" "+k2.getRoutingTable().getAllNodes().size());
}

}catch(Exception e){
Expand Down

0 comments on commit accd535

Please sign in to comment.