From a37b827e6a52c9d9f286f1e315695eb1397bb343 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 9 Oct 2011 12:37:56 +1100 Subject: [PATCH] Display the total solved blocks on exit (LOL if you're lucky). --- main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.c b/main.c index 0546ac4c..cee360bc 100644 --- a/main.c +++ b/main.c @@ -265,6 +265,7 @@ static int total_accepted, total_rejected; static int total_getworks, total_stale, total_discarded; static int total_queued; static unsigned int new_blocks; +static unsigned int found_blocks; static unsigned int local_work; static unsigned int total_go, total_ro; @@ -2212,6 +2213,8 @@ static bool submit_upstream_work(const struct work *work) if (!QUIET) { isblock = regeneratehash(work); + if (isblock) + found_blocks++; hash32 = (uint32_t *)(work->hash); sprintf(hashshow, "%08lx.%08lx.%08lx%s", (unsigned long)(hash32[7]), (unsigned long)(hash32[6]), (unsigned long)(hash32[5]), @@ -5064,6 +5067,7 @@ static void print_summary(void) applog(LOG_WARNING, "Runtime: %d hrs : %d mins : %d secs", hours, mins, secs); if (total_secs) applog(LOG_WARNING, "Average hashrate: %.1f Megahash/s", total_mhashes_done / total_secs); + applog(LOG_WARNING, "Solved blocks: %d", found_blocks); applog(LOG_WARNING, "Queued work requests: %d", total_getworks); applog(LOG_WARNING, "Share submissions: %d", total_accepted + total_rejected); applog(LOG_WARNING, "Accepted shares: %d", total_accepted);