Browse Source

Merge branch 'master' of https://github.com/GOSTSec/sgminer

pull/1/head
orignal 6 years ago
parent
commit
5da02334b2
  1. 3
      algorithm.h
  2. 3
      api.c
  3. 1
      ocl.c
  4. 7
      sgminer.c

3
algorithm.h

@ -33,14 +33,11 @@ typedef enum {
ALGO_LYRA2RE, ALGO_LYRA2RE,
ALGO_LYRA2REV2, ALGO_LYRA2REV2,
ALGO_PLUCK, ALGO_PLUCK,
ALGO_YESCRYPT,
ALGO_YESCRYPT_MULTI,
ALGO_BLAKECOIN, ALGO_BLAKECOIN,
ALGO_BLAKE, ALGO_BLAKE,
ALGO_SIA, ALGO_SIA,
ALGO_DECRED, ALGO_DECRED,
ALGO_VANILLA, ALGO_VANILLA,
ALGO_LBRY,
ALGO_SIBCOIN, ALGO_SIBCOIN,
ALGO_GOSTCOIN, ALGO_GOSTCOIN,
ALGO_GOSTD ALGO_GOSTD

3
api.c

@ -122,8 +122,7 @@ struct CODES codes[] = {
{ SEVERITY_ERR, MSG_NOPOOL, PARAM_NONE, "No pools" }, { SEVERITY_ERR, MSG_NOPOOL, PARAM_NONE, "No pools" },
{ SEVERITY_SUCC, MSG_DEVS, PARAM_DMAX, "%d GPU(s)" }, { SEVERITY_SUCC, MSG_DEVS, PARAM_DMAX, "%d GPU(s)" },
{ SEVERITY_ERR, MSG_NODEVS, PARAM_NONE, "No GPUs" { SEVERITY_ERR, MSG_NODEVS, PARAM_NONE, "No GPUs" },
},
{ SEVERITY_SUCC, MSG_SUMM, PARAM_NONE, "Summary" }, { SEVERITY_SUCC, MSG_SUMM, PARAM_NONE, "Summary" },
{ SEVERITY_INFO, MSG_GPUDIS, PARAM_GPU, "GPU %d set disable flag" }, { SEVERITY_INFO, MSG_GPUDIS, PARAM_GPU, "GPU %d set disable flag" },

1
ocl.c

@ -675,7 +675,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize, algorithm_t *alg
size_t readbufsize = 128; size_t readbufsize = 128;
if (algorithm->type == ALGO_CRE) readbufsize = 168; if (algorithm->type == ALGO_CRE) readbufsize = 168;
else if (algorithm->type == ALGO_DECRED) readbufsize = 192; else if (algorithm->type == ALGO_DECRED) readbufsize = 192;
else if (algorithm->type == ALGO_LBRY) readbufsize = 112;
else if (algorithm->type == ALGO_PASCAL) readbufsize = 196; else if (algorithm->type == ALGO_PASCAL) readbufsize = 196;
if (algorithm->rw_buffer_size < 0) { if (algorithm->rw_buffer_size < 0) {

7
sgminer.c

@ -5635,9 +5635,6 @@ static void *stratum_sthread(void *userdata)
else if (pool->algorithm.type == ALGO_DECRED) { else if (pool->algorithm.type == ALGO_DECRED) {
nonce = *((uint32_t *)(work->data + 140)); nonce = *((uint32_t *)(work->data + 140));
} }
else if (pool->algorithm.type == ALGO_LBRY) {
nonce = *((uint32_t *)(work->data + 108));
}
else if (pool->algorithm.type == ALGO_SIA) { else if (pool->algorithm.type == ALGO_SIA) {
nonce = *((uint32_t *)(work->data + 32)); nonce = *((uint32_t *)(work->data + 32));
} }
@ -7198,7 +7195,6 @@ static void rebuild_nonce(struct work *work, uint32_t nonce)
uint32_t nonce_pos = 76; uint32_t nonce_pos = 76;
if (work->pool->algorithm.type == ALGO_CRE) nonce_pos = 140; if (work->pool->algorithm.type == ALGO_CRE) nonce_pos = 140;
else if (work->pool->algorithm.type == ALGO_DECRED) nonce_pos = 140; else if (work->pool->algorithm.type == ALGO_DECRED) nonce_pos = 140;
else if (work->pool->algorithm.type == ALGO_LBRY) nonce_pos = 108;
else if (work->pool->algorithm.type == ALGO_SIA) nonce_pos = 32; else if (work->pool->algorithm.type == ALGO_SIA) nonce_pos = 32;
else if (work->pool->algorithm.type == ALGO_PASCAL) nonce_pos = 196; else if (work->pool->algorithm.type == ALGO_PASCAL) nonce_pos = 196;
@ -7218,8 +7214,7 @@ bool test_nonce(struct work *work, uint32_t nonce)
rebuild_nonce(work, nonce); rebuild_nonce(work, nonce);
// for Neoscrypt, the diff1targ value is in work->target // for Neoscrypt, the diff1targ value is in work->target
if (work->pool->algorithm.type == ALGO_NEOSCRYPT || work->pool->algorithm.type == ALGO_PLUCK if (work->pool->algorithm.type == ALGO_NEOSCRYPT || work->pool->algorithm.type == ALGO_PLUCK) {
|| work->pool->algorithm.type == ALGO_YESCRYPT || work->pool->algorithm.type == ALGO_YESCRYPT_MULTI) {
diff1targ = ((uint32_t *)work->target)[7]; diff1targ = ((uint32_t *)work->target)[7];
} }
else { else {

Loading…
Cancel
Save