File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const POINT_COLOR = {
4343} ;
4444
4545const POINT_TTL = {
46- blockchain : 60 ,
46+ blockchain : 60 * 2 ,
4747} ;
4848
4949const POINT_RADIUS = {
You can’t perform that action at this time.
0 commit comments