mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-06 03:02:03 +00:00
Bugfix: Only show each device once in exit summary
This commit is contained in:
parent
d9ccb3b485
commit
f634b68e7c
20
main.c
20
main.c
@ -4896,14 +4896,6 @@ void reinit_device(struct cgpu_info *cgpu)
|
|||||||
cgpu->api->reinit_device(cgpu);
|
cgpu->api->reinit_device(cgpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine which are the first threads belonging to a device and if they're
|
|
||||||
* active */
|
|
||||||
static bool active_device(int thr_id)
|
|
||||||
{
|
|
||||||
struct cgpu_info *cgpu = thr_info[thr_id].cgpu;
|
|
||||||
return cgpu->enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Makes sure the hashmeter keeps going even if mining threads stall, updates
|
/* Makes sure the hashmeter keeps going even if mining threads stall, updates
|
||||||
* the screen at regular intervals, and restarts threads if they appear to have
|
* the screen at regular intervals, and restarts threads if they appear to have
|
||||||
* died. */
|
* died. */
|
||||||
@ -5077,16 +5069,12 @@ static void *watchdog_thread(void *userdata)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void log_print_status(int thr_id)
|
static void log_print_status(struct cgpu_info *cgpu)
|
||||||
{
|
{
|
||||||
struct cgpu_info *cgpu;
|
|
||||||
char logline[255];
|
char logline[255];
|
||||||
|
|
||||||
cgpu = thr_info[thr_id].cgpu;
|
|
||||||
if (cgpu) {
|
|
||||||
get_statline(logline, cgpu);
|
get_statline(logline, cgpu);
|
||||||
applog(LOG_WARNING, "%s", logline);
|
applog(LOG_WARNING, "%s", logline);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_summary(void)
|
static void print_summary(void)
|
||||||
@ -5157,9 +5145,9 @@ static void print_summary(void)
|
|||||||
applog(LOG_WARNING, "Donated share submissions: %d\n", donationpool.accepted + donationpool.rejected);
|
applog(LOG_WARNING, "Donated share submissions: %d\n", donationpool.accepted + donationpool.rejected);
|
||||||
|
|
||||||
applog(LOG_WARNING, "Summary of per device statistics:\n");
|
applog(LOG_WARNING, "Summary of per device statistics:\n");
|
||||||
for (i = 0; i < mining_threads; i++) {
|
for (i = 0; i < total_devices; ++i) {
|
||||||
if (active_device(i))
|
if (devices[i]->enabled)
|
||||||
log_print_status(i);
|
log_print_status(devices[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_shares)
|
if (opt_shares)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user