Author: nextgens
Date: 2007-09-26 17:38:57 +0000 (Wed, 26 Sep 2007)
New Revision: 15339

Modified:
   branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java
   branches/freenet-jfk/src/freenet/node/PeerNode.java
Log:
That's uber-ugly!

Modified: branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java
===================================================================
--- branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java 2007-09-26 
17:34:37 UTC (rev 15338)
+++ branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java 2007-09-26 
17:38:57 UTC (rev 15339)
@@ -40,9 +40,7 @@
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.math.BigInteger;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;

 /**
  * @author amphibian
@@ -76,7 +74,7 @@
        /** We renew it on each *successful* run of the protocol (the spec. 
says "once a while") - access is synchronized! */
        private DiffieHellmanLightContext currentDHContext = null;
        // TODO: is 64 bits enough ?
-       private static final int NONCE_SIZE = 6;
+       protected static final int NONCE_SIZE = 6;
        private static final int MAX_PACKETS_IN_FLIGHT = 256; 
        private static final int RANDOM_BYTES_LENGTH = 12;
        private static final int HASH_LENGTH = SHA256.getDigestLength();

Modified: branches/freenet-jfk/src/freenet/node/PeerNode.java
===================================================================
--- branches/freenet-jfk/src/freenet/node/PeerNode.java 2007-09-26 17:34:37 UTC 
(rev 15338)
+++ branches/freenet-jfk/src/freenet/node/PeerNode.java 2007-09-26 17:38:57 UTC 
(rev 15339)
@@ -92,7 +92,7 @@
      * Currently Idi is not being used, but may find use in opennet
      * Used to verify the signature in JFK(4)
      */
-    protected byte[] bufferJFK = new 
byte[NONCE_SIZE*2+DiffieHellman.modulusLengthInBytes()*2];
+    protected byte[] bufferJFK = new 
byte[FNPPacketMangler.NONCE_SIZE*2+DiffieHellman.modulusLengthInBytes()*2];

     /** My low-level address for SocketManager purposes */
     private Peer detectedPeer;
@@ -303,7 +303,6 @@
     /** If the clock delta is more than this constant, we don't talk to the 
node. Reason: It may not be up to date,
      * it will have difficulty resolving date-based content etc. */
        private static final long MAX_CLOCK_DELTA = 24L*60L*60L*1000L;
-        private static final int NONCE_SIZE = 6;

        /** A WeakReference to this object. Can be taken whenever a node object 
needs to refer to this object for a 
         * long time, but without preventing it from being GC'ed. */


Reply via email to