Browse Source

Fix typos in neoscrypt conditions

theLosers106
elbandi 9 years ago
parent
commit
6efe2f94a8
  1. 12
      sgminer.c

12
sgminer.c

@ -2148,7 +2148,7 @@ static void gen_gbt_work(struct pool *pool, struct work *work) @@ -2148,7 +2148,7 @@ static void gen_gbt_work(struct pool *pool, struct work *work)
}
// Neoscrypt doesn't calc_midstate()
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
if (pool->algorithm.type != ALGO_NEOSCRYPT) {
calc_midstate(work);
}
local_work++;
@ -5574,7 +5574,7 @@ static void *stratum_sthread(void *userdata) @@ -5574,7 +5574,7 @@ static void *stratum_sthread(void *userdata)
applog(LOG_DEBUG, "stratum_sthread() algorithm = %s", pool->algorithm.name);
// Neoscrypt is little endian
if (!pool->algorithm.type == ALGO_NEOSCRYPT) {
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
nonce = htobe32(*((uint32_t *)(work->data + 76)));
//*((uint32_t *)nonce2) = htole32(work->nonce2);
}
@ -6078,7 +6078,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work) @@ -6078,7 +6078,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
applog(LOG_DEBUG, "[THR%d] gen_stratum_work() - algorithm = %s", work->thr_id, pool->algorithm.name);
// Different for Neoscrypt because of Little Endian
if (!pool->algorithm.type == ALGO_NEOSCRYPT) {
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
/* Incoming data is in little endian. */
memcpy(merkle_root, merkle_sha, 32);
@ -6140,7 +6140,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work) @@ -6140,7 +6140,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
}
// For Neoscrypt use set_target_neoscrypt() function
if (!pool->algorithm.type == ALGO_NEOSCRYPT) {
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
set_target_neoscrypt(work->target, work->sdiff, work->thr_id);
} else {
calc_midstate(work);
@ -6238,7 +6238,7 @@ static void apply_initial_gpu_settings(struct pool *pool) @@ -6238,7 +6238,7 @@ static void apply_initial_gpu_settings(struct pool *pool)
//thread-concurrency
// neoscrypt - if not specified set TC to 0 so that TC will be calculated by intensity settings
if (!pool->algorithm.type == ALGO_NEOSCRYPT) {
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
opt = ((empty_string(pool->thread_concurrency))?"0":get_pool_setting(pool->thread_concurrency, default_profile.thread_concurrency));
}
// otherwise use pool/profile setting or default to default profile setting
@ -6562,7 +6562,7 @@ static void apply_switcher_options(unsigned long options, struct pool *pool) @@ -6562,7 +6562,7 @@ static void apply_switcher_options(unsigned long options, struct pool *pool)
if(opt_isset(options, SWITCHER_APPLY_TC))
{
// neoscrypt - if not specified set TC to 0 so that TC will be calculated by intensity settings
if (!pool->algorithm.type == ALGO_NEOSCRYPT) {
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
opt = ((empty_string(pool->thread_concurrency))?"0":get_pool_setting(pool->thread_concurrency, default_profile.thread_concurrency));
}
// otherwise use pool/profile setting or default to default profile setting

Loading…
Cancel
Save