diff --git a/equi/equi-stratum.cpp b/equi/equi-stratum.cpp index 83e67ab..403c185 100644 --- a/equi/equi-stratum.cpp +++ b/equi/equi-stratum.cpp @@ -197,7 +197,9 @@ bool equi_stratum_show_message(struct stratum_ctx *sctx, json_t *id, json_t *par const char* data = json_string_value(val); if (data && strlen(data)) { char symbol[32] = { 0 }; - int ss = sscanf(data, "equihash %s block %u", symbol, &sctx->job.height); + uint32_t height = 0; + int ss = sscanf(data, "equihash %s block %u", symbol, &height); + if (height && ss > 1) sctx->job.height = height; if (opt_debug && ss > 1) applog(LOG_DEBUG, "%s", data); } } diff --git a/res/ccminer.rc b/res/ccminer.rc index 44ef540..d7cf1c2 100644 --- a/res/ccminer.rc +++ b/res/ccminer.rc @@ -60,8 +60,8 @@ IDI_ICON1 ICON "ccminer.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,0,0 - PRODUCTVERSION 2,0,0,0 + FILEVERSION 2,2,0,0 + PRODUCTVERSION 2,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x21L @@ -76,10 +76,10 @@ BEGIN BEGIN BLOCK "040904e4" BEGIN - VALUE "FileVersion", "2.0" + VALUE "FileVersion", "2.2" VALUE "LegalCopyright", "Copyright (C) 2017" VALUE "ProductName", "ccminer" - VALUE "ProductVersion", "2.0" + VALUE "ProductVersion", "2.2" END END BLOCK "VarFileInfo" diff --git a/skunk/skunk.cu b/skunk/skunk.cu index 0a503e7..a991a6b 100644 --- a/skunk/skunk.cu +++ b/skunk/skunk.cu @@ -101,7 +101,7 @@ extern "C" int scanhash_skunk(int thr_id, struct work* work, uint32_t max_nonce, skunk_cpu_init(thr_id, throughput); use_compat_kernels[thr_id] = (cuda_arch[dev_id] < 500 || CUDART_VERSION < 7500 || CUDART_VERSION > 8000); - x13_fugue512_cpu_init(thr_id, throughput); + if (use_compat_kernels[thr_id]) x13_fugue512_cpu_init(thr_id, throughput); CUDA_CALL_OR_RET_X(cudaMalloc(&d_hash[thr_id], (size_t) 64 * throughput), 0); CUDA_CALL_OR_RET_X(cudaMalloc(&d_resNonce[thr_id], NBN * sizeof(uint32_t)), -1); @@ -200,7 +200,8 @@ extern "C" void free_skunk(int thr_id) cudaThreadSynchronize(); - x13_fugue512_cpu_free(thr_id); + if (use_compat_kernels[thr_id]) + x13_fugue512_cpu_free(thr_id); cudaFree(d_hash[thr_id]); cudaFree(d_resNonce[thr_id]);