Skip to content

Commit

Permalink
UID fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DrBrad committed Apr 18, 2024
1 parent 90fb9f4 commit 81765f5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 2 deletions.
Binary file modified out/production/Kad4/unet/kad4/routing/kb/KRoutingTable.class
Binary file not shown.
Binary file modified out/production/Kad4/unet/kad4/utils/UID.class
Binary file not shown.
Binary file modified out/test/Kad4/unet/kad4/example/Main.class
Binary file not shown.
3 changes: 1 addition & 2 deletions src/unet/kad4/routing/kb/KRoutingTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ public synchronized boolean hasQueried(Node node, long now){

@Override
public synchronized int getBucketUID(UID k){
int id = uid.getDistance(k)-1;
return id < 0 ? 0 : id;
return uid.getDistance(k);
}

@Override
Expand Down

0 comments on commit 81765f5

Please sign in to comment.