This commit is contained in:
Jay D Dee
2020-01-08 14:44:47 -05:00
parent 3572cb53c4
commit 70089d1224
121 changed files with 1842 additions and 14893 deletions

View File

@@ -44,15 +44,15 @@ bool register_xi20r_algo( algo_gate_t* gate );
void x20r_4way_hash( void *state, const void *input );
int scanhash_x20r_4way( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done );
int scanhash_x20r_4way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
#endif
void x20rhash( void *state, const void *input );
int scanhash_x20r( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done );
int scanhash_x20r( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
#endif

View File

@@ -228,8 +228,8 @@ void x20r_hash(void* output, const void* input)
memcpy(output, hash, 32);
}
int scanhash_x20r( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done )
int scanhash_x20r( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr )
{
uint32_t _ALIGN(128) hash32[8];
uint32_t _ALIGN(128) endiandata[20];
@@ -238,6 +238,7 @@ int scanhash_x20r( int thr_id, struct work *work, uint32_t max_nonce,
const uint32_t Htarg = ptarget[7];
const uint32_t first_nonce = pdata[19];
uint32_t nonce = first_nonce;
int thr_id = mythr->id;
volatile uint8_t *restart = &(work_restart[thr_id].restart);
for (int k=0; k < 19; k++)
@@ -259,11 +260,9 @@ int scanhash_x20r( int thr_id, struct work *work, uint32_t max_nonce,
x20r_hash( hash32, endiandata );
if ( hash32[7] <= Htarg && fulltest( hash32, ptarget ) )
{
work_set_target_ratio( work, hash32 );
pdata[19] = nonce;
*hashes_done = pdata[19] - first_nonce;
return 1;
{
pdata[19] = nonce;
submit_solution( work, hash32, mythr );
}
nonce++;