mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-08 21:14:14 +00:00
Fix inkcoin
This commit is contained in:
parent
303b27d3ac
commit
d7df5db1f0
@ -132,53 +132,6 @@ void inkcoin_regenhash(struct work *work)
|
|||||||
inkhash(ohash, data);
|
inkhash(ohash, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void xhash(void *state, const void *input)
|
|
||||||
{
|
|
||||||
init_Xhash_contexts();
|
|
||||||
|
|
||||||
Xhash_context_holder ctx;
|
|
||||||
|
|
||||||
uint32_t hashA[16], hashB[16];
|
|
||||||
//blake-bmw-groestl-sken-jh-meccak-luffa-cubehash-shivite-simd-echo
|
|
||||||
memcpy(&ctx, &base_contexts, sizeof(base_contexts));
|
|
||||||
|
|
||||||
sph_blake512 (&ctx.blake1, input, 80);
|
|
||||||
sph_blake512_close (&ctx.blake1, hashA);
|
|
||||||
|
|
||||||
sph_bmw512 (&ctx.bmw1, hashA, 64);
|
|
||||||
sph_bmw512_close(&ctx.bmw1, hashB);
|
|
||||||
|
|
||||||
sph_groestl512 (&ctx.groestl1, hashB, 64);
|
|
||||||
sph_groestl512_close(&ctx.groestl1, hashA);
|
|
||||||
|
|
||||||
sph_skein512 (&ctx.skein1, hashA, 64);
|
|
||||||
sph_skein512_close(&ctx.skein1, hashB);
|
|
||||||
|
|
||||||
sph_jh512 (&ctx.jh1, hashB, 64);
|
|
||||||
sph_jh512_close(&ctx.jh1, hashA);
|
|
||||||
|
|
||||||
sph_keccak512 (&ctx.keccak1, hashA, 64);
|
|
||||||
sph_keccak512_close(&ctx.keccak1, hashB);
|
|
||||||
|
|
||||||
sph_luffa512 (&ctx.luffa1, hashB, 64);
|
|
||||||
sph_luffa512_close (&ctx.luffa1, hashA);
|
|
||||||
|
|
||||||
sph_cubehash512 (&ctx.cubehash1, hashA, 64);
|
|
||||||
sph_cubehash512_close(&ctx.cubehash1, hashB);
|
|
||||||
|
|
||||||
sph_shavite512 (&ctx.shavite1, hashB, 64);
|
|
||||||
sph_shavite512_close(&ctx.shavite1, hashA);
|
|
||||||
|
|
||||||
sph_simd512 (&ctx.simd1, hashA, 64);
|
|
||||||
sph_simd512_close(&ctx.simd1, hashB);
|
|
||||||
|
|
||||||
sph_echo512 (&ctx.echo1, hashB, 64);
|
|
||||||
sph_echo512_close(&ctx.echo1, hashA);
|
|
||||||
|
|
||||||
memcpy(state, hashA, 32);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool scanhash_inkcoin(struct thr_info *thr, const unsigned char __maybe_unused *pmidstate,
|
bool scanhash_inkcoin(struct thr_info *thr, const unsigned char __maybe_unused *pmidstate,
|
||||||
unsigned char *pdata, unsigned char __maybe_unused *phash1,
|
unsigned char *pdata, unsigned char __maybe_unused *phash1,
|
||||||
unsigned char __maybe_unused *phash, const unsigned char *ptarget,
|
unsigned char __maybe_unused *phash, const unsigned char *ptarget,
|
||||||
@ -197,7 +150,7 @@ bool scanhash_inkcoin(struct thr_info *thr, const unsigned char __maybe_unused *
|
|||||||
|
|
||||||
*nonce = ++n;
|
*nonce = ++n;
|
||||||
data[19] = (n);
|
data[19] = (n);
|
||||||
xhash(ostate, data);
|
inkhash(ostate, data);
|
||||||
tmp_hash7 = (ostate[7]);
|
tmp_hash7 = (ostate[7]);
|
||||||
|
|
||||||
applog(LOG_INFO, "data7 %08lx",
|
applog(LOG_INFO, "data7 %08lx",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user