Skip to content

Commit aff5eb6

Browse files
committed
Simplify RPCID
1 parent b7c6a7b commit aff5eb6

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/main/java/com/lbry/globe/util/DHT.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,21 @@ public static DHT.Message<?> fromBencode(byte[] data){
146146

147147
public static class RPCID{
148148

149-
private final DHT.Message<?> message;
149+
private final byte[] id;
150150

151-
public RPCID(DHT.Message<?> message){
152-
this.message = message;
151+
public RPCID(byte[] id){
152+
this.id = id;
153+
}
154+
155+
public RPCID(Message<?> message){
156+
this(message.rpcID);
153157
}
154158

155159
@Override
156160
public boolean equals(Object obj){
157161
if(obj instanceof RPCID){
158162
RPCID other = (RPCID) obj;
159-
return Arrays.equals(this.message.rpcID,other.message.rpcID);// && Arrays.equals(this.message.nodeID,other.nodeID);
163+
return Arrays.equals(this.id,other.id);
160164
}
161165
return super.equals(obj);
162166
}
@@ -169,9 +173,10 @@ public int hashCode(){
169173
@Override
170174
public String toString() {
171175
return "RPCID{" +
172-
"rpcID=" + Hex.encode(this.message.rpcID) +
176+
"id=" + Hex.encode(id) +
173177
'}';
174178
}
179+
175180
}
176181

177182
}

src/main/resources/globe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const POINT_COLOR = {
4343
};
4444

4545
const POINT_TTL = {
46-
blockchain: 60,
46+
blockchain: 60 * 2,
4747
};
4848

4949
const POINT_RADIUS = {

0 commit comments

Comments
 (0)