Skip to content

Commit 22a36ef

Browse files
authored
Merge pull request tronprotocol#3114 from linktechchi/develop
remove KademliaOptions from common module
2 parents 754f79f + 49ca8f5 commit 22a36ef

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

common/src/main/java/org/tron/common/option/KademliaOptions.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

common/src/main/java/org/tron/common/overlay/discover/node/Node.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import lombok.extern.slf4j.Slf4j;
88
import org.apache.commons.lang3.StringUtils;
99
import org.spongycastle.util.encoders.Hex;
10-
import org.tron.common.option.KademliaOptions;
1110
import org.tron.common.utils.ByteArray;
1211
import org.tron.common.utils.Utils;
1312

@@ -56,8 +55,9 @@ public static Node instanceOf(String hostPort) {
5655
}
5756

5857
public static byte[] getNodeId() {
58+
int NODE_ID_LENGTH = 64;
5959
Random gen = new Random();
60-
byte[] id = new byte[KademliaOptions.NODE_ID_LEN];
60+
byte[] id = new byte[NODE_ID_LENGTH];
6161
gen.nextBytes(id);
6262
return id;
6363
}

0 commit comments

Comments
 (0)