We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 754f79f + 49ca8f5 commit 22a36efCopy full SHA for 22a36ef
common/src/main/java/org/tron/common/option/KademliaOptions.java
common/src/main/java/org/tron/common/overlay/discover/node/Node.java
@@ -7,7 +7,6 @@
7
import lombok.extern.slf4j.Slf4j;
8
import org.apache.commons.lang3.StringUtils;
9
import org.spongycastle.util.encoders.Hex;
10
-import org.tron.common.option.KademliaOptions;
11
import org.tron.common.utils.ByteArray;
12
import org.tron.common.utils.Utils;
13
@@ -56,8 +55,9 @@ public static Node instanceOf(String hostPort) {
56
55
}
57
58
public static byte[] getNodeId() {
+ int NODE_ID_LENGTH = 64;
59
Random gen = new Random();
60
- byte[] id = new byte[KademliaOptions.NODE_ID_LEN];
+ byte[] id = new byte[NODE_ID_LENGTH];
61
gen.nextBytes(id);
62
return id;
63
0 commit comments