diff --git a/api.cpp b/api.cpp index c9ab97c..817ad43 100644 --- a/api.cpp +++ b/api.cpp @@ -94,6 +94,7 @@ extern char *opt_api_allow; extern int opt_api_listen; /* port */ extern uint32_t accepted_count; extern uint32_t rejected_count; +extern uint32_t opt_work_adds; extern int num_cpus; extern struct stratum_ctx stratum; extern char* rpc_user; @@ -887,10 +888,13 @@ void apiReportThroughput(int thr_id, uint32_t throughput) while (ws > 1 && i++ < 32) ws = ws >> 1; cgpu->intensity_int = i; + cgpu->intensity = (float) i; } else { cgpu->intensity_int = (uint8_t) opt_intensity; + cgpu->intensity = (float) opt_intensity; + if (opt_work_adds) { + cgpu->intensity += ((float) opt_work_adds / (1U << opt_intensity)); + } } - // dec. part to finish... - cgpu->intensity = (float) cgpu->intensity_int; } } \ No newline at end of file