Fixed invalid shares.
This commit is contained in:
parent
82595ee256
commit
db79911c4b
2 changed files with 2 additions and 14 deletions
|
@ -63,20 +63,12 @@ xmrig::RxCache::~RxCache()
|
|||
|
||||
bool xmrig::RxCache::init(const Buffer &seed)
|
||||
{
|
||||
if (isReady(seed)) {
|
||||
if (m_seed == seed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_seed = seed;
|
||||
randomx_init_cache(m_cache, m_seed.data(), sizeof(m_seed));
|
||||
|
||||
m_initCount++;
|
||||
randomx_init_cache(m_cache, m_seed.data(), m_seed.size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool xmrig::RxCache::isReady(const Buffer &seed) const
|
||||
{
|
||||
return !m_seed.isEmpty() && m_seed == seed;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue