Initialize libsodium and remove openssl headers from util.cpp
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
#include "sodium.h"
|
||||||
|
|
||||||
#include "addrman.h"
|
#include "addrman.h"
|
||||||
#include "amount.h"
|
#include "amount.h"
|
||||||
@@ -632,6 +633,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
// ********************************************************* Step 0: Load zcash params
|
// ********************************************************* Step 0: Load zcash params
|
||||||
ZC_LoadParams();
|
ZC_LoadParams();
|
||||||
|
|
||||||
|
// Perform libsodium initialization
|
||||||
|
if (sodium_init() == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// ********************************************************* Step 1: setup
|
// ********************************************************* Step 1: setup
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Turn off Microsoft heap dump noise
|
// Turn off Microsoft heap dump noise
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#include "test_bitcoin.h"
|
#include "test_bitcoin.h"
|
||||||
|
|
||||||
|
#include "sodium.h"
|
||||||
|
|
||||||
#include "key.h"
|
#include "key.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
@@ -30,6 +32,7 @@ extern void noui_connect();
|
|||||||
|
|
||||||
BasicTestingSetup::BasicTestingSetup()
|
BasicTestingSetup::BasicTestingSetup()
|
||||||
{
|
{
|
||||||
|
assert(sodium_init() != -1);
|
||||||
ECC_Start();
|
ECC_Start();
|
||||||
SetupEnvironment();
|
SetupEnvironment();
|
||||||
fPrintToDebugLog = false; // don't want to write to debug.log file
|
fPrintToDebugLog = false; // don't want to write to debug.log file
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|||||||
Reference in New Issue
Block a user