This commit is contained in:
Jay D Dee
2017-03-04 16:23:24 -05:00
parent 33b1bb5cd4
commit 7b94436202
32 changed files with 3060 additions and 76 deletions

View File

@@ -129,6 +129,8 @@ void blake2b_be_build_stratum_request( char *req, struct work *work )
free( xnonce2str );
}
#define min(a,b) (a>b ? (b) :(a))
// merkle root handled here, no need for gen_merkle_root gate target
void blake2b_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
{
@@ -161,6 +163,8 @@ void blake2b_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
g_work->data[12+i] = ( (uint32_t*)merkle_root )[i];
}
#undef min
void blake2b_get_new_work( struct work* work, struct work* g_work, int thr_id,
uint32_t* end_nonce_ptr, bool clean_job )
{

View File

@@ -194,6 +194,9 @@ void decred_gen_merkle_root( char* merkle_root, struct stratum_ctx* sctx )
memcpy( decred_extraheader, &sctx->job.coinbase[32], decred_headersize);
}
*/
#define min(a,b) (a>b ? (b) :(a))
void decred_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
{
uchar merkle_root[64] = { 0 };
@@ -239,6 +242,8 @@ void decred_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
//applog_hex(&work->data[36], 36);
}
#undef min
/*
bool decred_prevent_dupes( struct work* work, struct stratum_ctx* stratum,
int thr_id )