Display per pool summary at the end if multiple pools in use. Fine tune statistics and make localgen fail at 5 mins.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/main.c b/main.c
index 3424042..10a92b9 100644
--- a/main.c
+++ b/main.c
@@ -1445,7 +1445,7 @@ retry:
if (total_pools > 1) {
/* Attempt to switch pools if this one has been unresponsive for >half
* a block's duration */
- if (diff.tv_sec > 30) {
+ if (diff.tv_sec > 300) {
switch_pools();
inc_staged(pool, 1, true);
goto retry;
@@ -1477,6 +1477,8 @@ retry:
if (total_pools > 1) {
/* Attempt to switch pools if this one has mandatory
* work that has timed out or does not support rolltime */
+ pool->localgen_occasions++;
+ total_lo++;
switch_pools();
inc_staged(pool, 1, true);
goto retry;
@@ -2308,6 +2310,27 @@ static void print_summary(void)
printf("Submitting work remotely delay occasions: %d\n", total_ro);
printf("New blocks detected on network: %d\n\n", new_blocks);
+ if (total_pools > 1) {
+ for (i = 0; i < total_pools; i++) {
+ struct pool *pool = &pools[i];
+
+ printf("Pool: %s\n", pool->rpc_url);
+ printf(" Queued work requests: %d\n", pool->getwork_requested);
+ printf(" Share submissions: %d\n", pool->accepted + pool->rejected);
+ printf(" Accepted shares: %d\n", pool->accepted);
+ printf(" Rejected shares: %d\n", pool->rejected);
+ if (pool->accepted || pool->rejected)
+ printf(" Reject ratio: %.1f\n", (double)(pool->rejected * 100) / (double)(pool->accepted + pool->rejected));
+ efficiency = pool->getwork_requested ? pool->accepted * 100.0 / pool->getwork_requested : 0.0;
+ printf(" Efficiency (accepted / queued): %.0f%%\n", efficiency);
+
+ printf(" Discarded work due to new blocks: %d\n", pool->discarded_work);
+ printf(" Stale submissions discarded due to new blocks: %d\n", pool->stale_shares);
+ printf(" Unable to get work from server occasions: %d\n", pool->localgen_occasions);
+ printf(" Submitting work remotely delay occasions: %d\n\n", pool->remotefail_occasions);
+ }
+ }
+
printf("Summary of per device statistics:\n\n");
for (i = 0; i < mining_threads; i++) {
if (active_device(i))