mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.7.0
This commit is contained in:
@@ -111,15 +111,7 @@ uint32_t *decred_get_nonceptr( uint32_t *work_data )
|
||||
return &work_data[ DECRED_NONCE_INDEX ];
|
||||
}
|
||||
|
||||
// does decred need a custom stratum_get_g_work to fix nicehash
|
||||
// bad extranonce2 size?
|
||||
//
|
||||
// does decred need a custom init_nonce?
|
||||
// does it need to increment nonce, seems not because gen_work_now always
|
||||
// returns true
|
||||
|
||||
double decred_calc_network_diff( struct work* work )
|
||||
//void decred_calc_network_diff( struct work* work )
|
||||
{
|
||||
// sample for diff 43.281 : 1c05ea29
|
||||
// todo: endian reversed on longpoll could be zr5 specific...
|
||||
@@ -235,11 +227,15 @@ void decred_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
|
||||
for ( i = 0; i < headersize/4; i++ ) // header
|
||||
g_work->data[17 + i] = extraheader[i];
|
||||
// extradata
|
||||
|
||||
for ( i = 0; i < sctx->xnonce1_size/4; i++ )
|
||||
g_work->data[ DECRED_XNONCE_INDEX + i ] = extradata[i];
|
||||
for ( i = DECRED_XNONCE_INDEX + sctx->xnonce1_size/4; i < 45; i++ )
|
||||
g_work->data[i] = 0;
|
||||
g_work->data[37] = (rand()*4) << 8;
|
||||
// block header suffix from coinb2 (stake version)
|
||||
memcpy( &g_work->data[44],
|
||||
&sctx->job.coinbase[ sctx->job.coinbase_size-4 ], 4 );
|
||||
sctx->bloc_height = g_work->data[32];
|
||||
//applog_hex(work->data, 180);
|
||||
//applog_hex(&work->data[36], 36);
|
||||
|
||||
@@ -250,7 +250,7 @@ bool register_drop_algo( algo_gate_t* gate )
|
||||
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
||||
gate->work_decode = (void*)&std_be_work_decode;
|
||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||
gate->set_work_data_endian = (void*)&swab_work_data;
|
||||
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||
gate->display_extra_data = (void*)&drop_display_pok;
|
||||
gate->work_data_size = 80;
|
||||
gate->work_cmp_size = 72;
|
||||
|
||||
@@ -361,11 +361,6 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
void m7m_reverse_endian( struct work *work )
|
||||
{
|
||||
swab32_array( work->data, work->data, 20 );
|
||||
}
|
||||
|
||||
bool register_m7m_algo( algo_gate_t *gate )
|
||||
{
|
||||
gate->optimizations = SSE2_OPT | AES_OPT | AVX_OPT | SHA_OPT;
|
||||
@@ -376,7 +371,7 @@ bool register_m7m_algo( algo_gate_t *gate )
|
||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||
gate->set_target = (void*)&scrypt_set_target;
|
||||
gate->get_max64 = (void*)&get_max64_0x1ffff;
|
||||
gate->set_work_data_endian = (void*)&m7m_reverse_endian;
|
||||
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1091,7 +1091,7 @@ bool register_neoscrypt_algo( algo_gate_t* gate )
|
||||
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
||||
gate->work_decode = (void*)&std_be_work_decode;
|
||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||
gate->set_work_data_endian = (void*)&swab_work_data;
|
||||
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||
gate->work_data_size = 80;
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ void init_x14_ctx()
|
||||
|
||||
static void x14hash(void *output, const void *input)
|
||||
{
|
||||
unsigned char hash[128]; __attribute__ ((aligned (32)))
|
||||
unsigned char hash[128] __attribute__ ((aligned (32)));
|
||||
#define hashB hash+64
|
||||
|
||||
x14_ctx_holder ctx;
|
||||
|
||||
@@ -231,7 +231,7 @@ bool register_zr5_algo( algo_gate_t* gate )
|
||||
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
||||
gate->work_decode = (void*)&std_be_work_decode;
|
||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||
gate->set_work_data_endian = (void*)&swab_work_data;
|
||||
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||
gate->work_data_size = 80;
|
||||
gate->work_cmp_size = 72;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user