1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-27 23:14:21 +00:00

Fix --benchmark not working since the dynamic addition of pools and pool stats.

This commit is contained in:
Con Kolivas 2012-07-06 19:35:28 +10:00
parent ff8686a34a
commit ad02627e6b

View File

@ -1852,6 +1852,7 @@ static void get_benchmark_work(struct work *work)
memset(work, 0, sizeof(work));
memcpy(work, &bench_block, min_size);
work->mandatory = true;
work->pool = pools[0];
}
static bool get_upstream_work(struct work *work, CURL *curl)
@ -5131,10 +5132,7 @@ int main(int argc, char *argv[])
if (opt_benchmark) {
struct pool *pool;
pool = calloc(sizeof(struct pool), 1);
pool->pool_no = 0;
pools[total_pools++] = pool;
pthread_mutex_init(&pool->pool_lock, NULL);
pool = add_pool();
pool->rpc_url = malloc(255);
strcpy(pool->rpc_url, "Benchmark");
pool->rpc_user = pool->rpc_url;