mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 13:52:02 +00:00
Fix --benchmark not working since the dynamic addition of pools and pool stats.
This commit is contained in:
parent
ff8686a34a
commit
ad02627e6b
@ -1852,6 +1852,7 @@ static void get_benchmark_work(struct work *work)
|
|||||||
memset(work, 0, sizeof(work));
|
memset(work, 0, sizeof(work));
|
||||||
memcpy(work, &bench_block, min_size);
|
memcpy(work, &bench_block, min_size);
|
||||||
work->mandatory = true;
|
work->mandatory = true;
|
||||||
|
work->pool = pools[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool get_upstream_work(struct work *work, CURL *curl)
|
static bool get_upstream_work(struct work *work, CURL *curl)
|
||||||
@ -5131,10 +5132,7 @@ int main(int argc, char *argv[])
|
|||||||
if (opt_benchmark) {
|
if (opt_benchmark) {
|
||||||
struct pool *pool;
|
struct pool *pool;
|
||||||
|
|
||||||
pool = calloc(sizeof(struct pool), 1);
|
pool = add_pool();
|
||||||
pool->pool_no = 0;
|
|
||||||
pools[total_pools++] = pool;
|
|
||||||
pthread_mutex_init(&pool->pool_lock, NULL);
|
|
||||||
pool->rpc_url = malloc(255);
|
pool->rpc_url = malloc(255);
|
||||||
strcpy(pool->rpc_url, "Benchmark");
|
strcpy(pool->rpc_url, "Benchmark");
|
||||||
pool->rpc_user = pool->rpc_url;
|
pool->rpc_user = pool->rpc_url;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user