Browse Source

Update sgminer.c & scrypt.c

Default opt_nfactor was 11 instead of 10, my typo.. :) Sorry.

scrypt_1024_1_1_256_sp renamed to scrypt_n_1_1_256_sp
build-mingw
Zuikkis 11 years ago committed by David Perkowski
parent
commit
2b9a588e25
  1. 4
      scrypt.c
  2. 2
      sgminer.c

4
scrypt.c

@ -356,7 +356,7 @@ salsa20_8(uint32_t B[16], const uint32_t Bx[16]) @@ -356,7 +356,7 @@ salsa20_8(uint32_t B[16], const uint32_t Bx[16])
/* cpu and memory intensive function to transform a 80 byte buffer into a 32 byte output
scratchpad size needs to be at least 63 + (128 * r * p) + (256 * r + 64) + (128 * r * N) bytes
*/
static void scrypt_1024_1_1_256_sp(const uint32_t* input, char* scratchpad, uint32_t *ostate, const cl_uint n)
static void scrypt_n_1_1_256_sp(const uint32_t* input, char* scratchpad, uint32_t *ostate, const cl_uint n)
{
uint32_t * V;
uint32_t X[32];
@ -417,7 +417,7 @@ void scrypt_regenhash(struct work *work) @@ -417,7 +417,7 @@ void scrypt_regenhash(struct work *work)
data[19] = htobe32(*nonce);
//scratchbuf = alloca(SCRATCHBUF_SIZE);
scratchbuf = (char *)alloca((1 << opt_nfactor) * 128 + 512);
scrypt_1024_1_1_256_sp(data, scratchbuf, ohash, (1 << opt_nfactor));
scrypt_n_1_1_256_sp(data, scratchbuf, ohash, (1 << opt_nfactor));
flip32(ohash, ohash);
}

2
sgminer.c

@ -92,7 +92,7 @@ int opt_log_interval = 5; @@ -92,7 +92,7 @@ int opt_log_interval = 5;
int opt_queue = 1;
int opt_scantime = 7;
int opt_expiry = 28;
int opt_nfactor = 11;
int opt_nfactor = 10;
static const bool opt_time = true;
unsigned long long global_hashrate;
unsigned long global_quota_gcd = 1;

Loading…
Cancel
Save