mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Changed init signature.
This commit is contained in:
parent
a8e86c3530
commit
044fbd7e82
4 changed files with 6 additions and 6 deletions
|
@ -62,7 +62,7 @@ xmrig::RxCache::~RxCache()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::RxCache::init(const void *seed)
|
||||
bool xmrig::RxCache::init(const uint8_t *seed)
|
||||
{
|
||||
if (isReady(seed)) {
|
||||
return false;
|
||||
|
@ -75,7 +75,7 @@ bool xmrig::RxCache::init(const void *seed)
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::RxCache::isReady(const void *seed) const
|
||||
bool xmrig::RxCache::isReady(const uint8_t *seed) const
|
||||
{
|
||||
return memcmp(m_seed, seed, sizeof(m_seed)) == 0;
|
||||
}
|
||||
|
|
|
@ -52,12 +52,12 @@ public:
|
|||
inline const uint8_t *seed() const { return m_seed; }
|
||||
inline randomx_cache *get() const { return m_cache; }
|
||||
|
||||
bool init(const void *seed);
|
||||
bool init(const uint8_t *seed);
|
||||
|
||||
static inline constexpr size_t size() { return RANDOMX_CACHE_MAX_SIZE; }
|
||||
|
||||
private:
|
||||
bool isReady(const void *seed) const;
|
||||
bool isReady(const uint8_t *seed) const;
|
||||
|
||||
int m_flags = 0;
|
||||
randomx_cache *m_cache = nullptr;
|
||||
|
|
|
@ -64,7 +64,7 @@ xmrig::RxDataset::~RxDataset()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::RxDataset::init(const void *seed, uint32_t numThreads)
|
||||
bool xmrig::RxDataset::init(const uint8_t *seed, uint32_t numThreads)
|
||||
{
|
||||
cache()->init(seed);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
inline randomx_dataset *get() const { return m_dataset; }
|
||||
inline RxCache *cache() const { return m_cache; }
|
||||
|
||||
bool init(const void *seed, uint32_t numThreads);
|
||||
bool init(const uint8_t *seed, uint32_t numThreads);
|
||||
std::pair<size_t, size_t> hugePages() const;
|
||||
|
||||
static inline constexpr size_t size() { return RANDOMX_DATASET_MAX_SIZE; }
|
||||
|
|
Loading…
Reference in a new issue