Browse Source

API add Best Share to summary

nfactor-troky
Kano 12 years ago
parent
commit
e55fe73f9a
  1. 5
      API-README
  2. 1
      api.c
  3. 2
      cgminer.c
  4. 1
      miner.h

5
API-README

@ -392,7 +392,10 @@ Added API commands: @@ -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

@ -1913,6 +1913,7 @@ static void summary(__maybe_unused SOCKETTYPE c, __maybe_unused char *param, boo @@ -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);

2
cgminer.c

@ -228,7 +228,7 @@ static char datestamp[40]; @@ -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];

1
miner.h

@ -786,6 +786,7 @@ extern const int opt_cutofftemp; @@ -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

Loading…
Cancel
Save