This commit is contained in:
Jay D Dee
2021-09-29 17:31:16 -04:00
parent 9b905fccc8
commit 2cd1507c2e
80 changed files with 8145 additions and 2097 deletions

View File

@@ -27,14 +27,11 @@
* coin.
*/
#include "yespower.h"
#include "algo-gate-api.h"
yespower_params_t yespower_params;
//SHA256_CTX sha256_prehash_ctx;
__thread sph_sha256_context sha256_prehash_ctx;
//__thread SHA256_CTX sha256_prehash_ctx;
__thread sha256_context sha256_prehash_ctx;
// YESPOWER
@@ -61,8 +58,8 @@ int scanhash_yespower( struct work *work, uint32_t max_nonce,
endiandata[19] = n;
// do sha256 prehash
sph_sha256_init( &sha256_prehash_ctx );
sph_sha256( &sha256_prehash_ctx, endiandata, 64 );
sha256_ctx_init( &sha256_prehash_ctx );
sha256_update( &sha256_prehash_ctx, endiandata, 64 );
do {
if ( yespower_hash( (char*)endiandata, (char*)vhash, 80, thr_id ) )
@@ -101,10 +98,6 @@ int scanhash_yespower_b2b( struct work *work, uint32_t max_nonce,
be32enc( &endiandata[k], pdata[k] );
endiandata[19] = n;
// do sha256 prehash
sph_sha256_init( &sha256_prehash_ctx );
sph_sha256( &sha256_prehash_ctx, endiandata, 64 );
do {
if (yespower_b2b_hash( (char*) endiandata, (char*) vhash, 80, thr_id ) )
if unlikely( valid_hash( vhash, ptarget ) && !opt_benchmark )