Initialize libsodium and remove openssl headers from util.cpp
This commit is contained in:
parent
41d4eb705b
commit
6806256b80
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#include <openssl/rand.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
|
Loading…
Reference in New Issue