Skip to content
Snippets Groups Projects
Unverified Commit 525d65b7 authored by fireice-uk's avatar fireice-uk Committed by GitHub
Browse files

Merge pull request #2314 from psychocrypt/fix-cryptonightRSlowdown

CPU: fix cryptonight_r slowdown
parents 78bd2481 74401e59
No related branches found
No related tags found
No related merge requests found
...@@ -1326,7 +1326,10 @@ struct Cryptonight_R_generator ...@@ -1326,7 +1326,10 @@ struct Cryptonight_R_generator
template<xmrstak_algo_id ALGO> template<xmrstak_algo_id ALGO>
static void cn_on_new_job(const xmrstak::miner_work& work, cryptonight_ctx** ctx) static void cn_on_new_job(const xmrstak::miner_work& work, cryptonight_ctx** ctx)
{ {
if(ctx[0]->cn_r_ctx.height == work.iBlockHeight && ctx[0]->last_algo == POW(cryptonight_r)) if(ctx[0]->cn_r_ctx.height == work.iBlockHeight &&
ctx[0]->last_algo == POW(cryptonight_r) &&
reinterpret_cast<void*>(ctx[0]->hash_fn) == ctx[0]->fun_data
)
return; return;
ctx[0]->last_algo = POW(cryptonight_r); ctx[0]->last_algo = POW(cryptonight_r);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment