1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

API add Best Share to summary

This commit is contained in:
Kano 2012-12-03 23:08:11 +11:00
parent a67e96c3e4
commit e55fe73f9a
4 changed files with 7 additions and 2 deletions

View File

@ -392,7 +392,10 @@ Added API commands:
'usbstats'
Modified API commands:
each MMQ shows up as 4 devices each with it's own stats
'summary' - add 'Best Share'
Modifed output:
each MMQ shows up as 4 devices, each with it's own stats
----------

1
api.c
View File

@ -1913,6 +1913,7 @@ static void summary(__maybe_unused SOCKETTYPE c, __maybe_unused char *param, boo
root = api_add_diff(root, "Difficulty Accepted", &(total_diff_accepted), true);
root = api_add_diff(root, "Difficulty Rejected", &(total_diff_rejected), true);
root = api_add_diff(root, "Difficulty Stale", &(total_diff_stale), true);
root = api_add_uint64(root, "Best Share", &(best_diff), true);
mutex_unlock(&hash_lock);

View File

@ -228,7 +228,7 @@ static char datestamp[40];
static char blocktime[32];
struct timeval block_timeval;
static char best_share[8] = "0";
static uint64_t best_diff = 0;
uint64_t best_diff = 0;
struct block {
char hash[40];

View File

@ -786,6 +786,7 @@ extern const int opt_cutofftemp;
extern int opt_log_interval;
extern unsigned long long global_hashrate;
extern char *current_fullhash;
extern uint64_t best_diff;
extern struct timeval block_timeval;
#ifdef HAVE_OPENCL