Allow disable RandomX support.

This commit is contained in:
XMRig 2019-06-18 06:11:53 +07:00
parent 3d17ba6af6
commit 2a07cf391d
6 changed files with 50 additions and 8 deletions

View file

@ -30,7 +30,10 @@
#include <list>
#include <uv.h>
#include <vector>
#include <randomx.h>
#ifdef XMRIG_ALGO_RANDOMX
# include <randomx.h>
#endif
#include "base/net/stratum/Job.h"
#include "net/JobResult.h"
@ -73,8 +76,10 @@ public:
static void threadsSummary(rapidjson::Document &doc);
# endif
# ifdef XMRIG_ALGO_RANDOMX
static void updateDataset(const uint8_t* seed_hash, uint32_t num_threads);
static randomx_dataset* getDataset();
# endif
private:
static void onReady(void *arg);
@ -119,11 +124,13 @@ private:
static uv_timer_t *m_timer;
static xmrig::Controller *m_controller;
# ifdef XMRIG_ALGO_RANDOMX
static uv_rwlock_t m_rx_dataset_lock;
static randomx_cache *m_rx_cache;
static randomx_dataset *m_rx_dataset;
static uint8_t m_rx_seed_hash[32];
static std::atomic<uint32_t> m_rx_dataset_init_thread_counter;
# endif
};