mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-24 05:24:23 +00:00
Fix typos in neoscrypt conditions
This commit is contained in:
parent
8d2eefe50c
commit
6efe2f94a8
12
sgminer.c
12
sgminer.c
@ -2148,7 +2148,7 @@ static void gen_gbt_work(struct pool *pool, struct work *work)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Neoscrypt doesn't calc_midstate()
|
// Neoscrypt doesn't calc_midstate()
|
||||||
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
|
if (pool->algorithm.type != ALGO_NEOSCRYPT) {
|
||||||
calc_midstate(work);
|
calc_midstate(work);
|
||||||
}
|
}
|
||||||
local_work++;
|
local_work++;
|
||||||
@ -5574,7 +5574,7 @@ static void *stratum_sthread(void *userdata)
|
|||||||
applog(LOG_DEBUG, "stratum_sthread() algorithm = %s", pool->algorithm.name);
|
applog(LOG_DEBUG, "stratum_sthread() algorithm = %s", pool->algorithm.name);
|
||||||
|
|
||||||
// Neoscrypt is little endian
|
// Neoscrypt is little endian
|
||||||
if (!pool->algorithm.type == ALGO_NEOSCRYPT) {
|
if (pool->algorithm.type == ALGO_NEOSCRYPT) {
|
||||||
nonce = htobe32(*((uint32_t *)(work->data + 76)));
|
nonce = htobe32(*((uint32_t *)(work->data + 76)));
|
||||||
//*((uint32_t *)nonce2) = htole32(work->nonce2);
|
//*((uint32_t *)nonce2) = htole32(work->nonce2);
|
||||||
}
|
}
|
||||||
@ -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);
|
applog(LOG_DEBUG, "[THR%d] gen_stratum_work() - algorithm = %s", work->thr_id, pool->algorithm.name);
|
||||||
|
|
||||||
// Different for Neoscrypt because of Little Endian
|
// 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. */
|
/* Incoming data is in little endian. */
|
||||||
memcpy(merkle_root, merkle_sha, 32);
|
memcpy(merkle_root, merkle_sha, 32);
|
||||||
|
|
||||||
@ -6140,7 +6140,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For Neoscrypt use set_target_neoscrypt() function
|
// 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);
|
set_target_neoscrypt(work->target, work->sdiff, work->thr_id);
|
||||||
} else {
|
} else {
|
||||||
calc_midstate(work);
|
calc_midstate(work);
|
||||||
@ -6238,7 +6238,7 @@ static void apply_initial_gpu_settings(struct pool *pool)
|
|||||||
|
|
||||||
//thread-concurrency
|
//thread-concurrency
|
||||||
// neoscrypt - if not specified set TC to 0 so that TC will be calculated by intensity settings
|
// 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));
|
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
|
// 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)
|
|||||||
if(opt_isset(options, SWITCHER_APPLY_TC))
|
if(opt_isset(options, SWITCHER_APPLY_TC))
|
||||||
{
|
{
|
||||||
// neoscrypt - if not specified set TC to 0 so that TC will be calculated by intensity settings
|
// 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));
|
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
|
// otherwise use pool/profile setting or default to default profile setting
|
||||||
|
Loading…
x
Reference in New Issue
Block a user