Move rand functions from util to new random.h/.cpp
[novacoin.git] / src / addrman.h
index 69a1271..80ef713 100644 (file)
 #include "util.h"
 #include "sync.h"
 
-
 #include <map>
 #include <vector>
 
-#include <openssl/rand.h>
-
 
 /** Extended statistics about a CAddress */
 class CAddrInfo : public CAddress
@@ -421,15 +418,7 @@ public:
             )
 
 
-    CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>())
-    {
-         nKey.resize(32);
-         RAND_bytes(&nKey[0], 32);
-
-         nIdCount = 0;
-         nTried = 0;
-         nNew = 0;
-    }
+    CAddrMan();
 
     // Return the number of (unique) addresses in all tables.
     int size()