Initialize libsodium and remove openssl headers from util.cpp

This commit is contained in:
Sean Bowe 2016-03-18 17:48:00 -06:00 committed by Taylor Hornby
parent 41d4eb705b
commit 6806256b80
3 changed files with 9 additions and 3 deletions

View File

@ -8,6 +8,7 @@
#endif
#include "init.h"
#include "sodium.h"
#include "addrman.h"
#include "amount.h"
@ -632,6 +633,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// ********************************************************* Step 0: Load zcash params
ZC_LoadParams();
// Perform libsodium initialization
if (sodium_init() == -1) {
return false;
}
// ********************************************************* Step 1: setup
#ifdef _MSC_VER
// Turn off Microsoft heap dump noise

View File

@ -6,6 +6,8 @@
#include "test_bitcoin.h"
#include "sodium.h"
#include "key.h"
#include "main.h"
#include "random.h"
@ -30,6 +32,7 @@ extern void noui_connect();
BasicTestingSetup::BasicTestingSetup()
{
assert(sodium_init() != -1);
ECC_Start();
SetupEnvironment();
fPrintToDebugLog = false; // don't want to write to debug.log file

View File

@ -1,6 +1,3 @@
#include <openssl/rand.h>
#include <openssl/err.h>
#include <string>
#include <iostream>
#include <fstream>