mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Rename work gbt_coinbase to coinbase to be in line with pool variable name.
This commit is contained in:
parent
5237bf350d
commit
11bcf2b3fb
12
cgminer.c
12
cgminer.c
@ -1552,7 +1552,7 @@ void clean_work(struct work *work)
|
|||||||
free(work->job_id);
|
free(work->job_id);
|
||||||
free(work->nonce2);
|
free(work->nonce2);
|
||||||
free(work->ntime);
|
free(work->ntime);
|
||||||
free(work->gbt_coinbase);
|
free(work->coinbase);
|
||||||
free(work->nonce1);
|
free(work->nonce1);
|
||||||
memset(work, 0, sizeof(struct work));
|
memset(work, 0, sizeof(struct work));
|
||||||
}
|
}
|
||||||
@ -1710,7 +1710,7 @@ static void gen_gbt_work(struct pool *pool, struct work *work)
|
|||||||
|
|
||||||
memcpy(work->target, pool->gbt_target, 32);
|
memcpy(work->target, pool->gbt_target, 32);
|
||||||
|
|
||||||
work->gbt_coinbase = bin2hex(pool->coinbase, pool->coinbase_len);
|
work->coinbase = bin2hex(pool->coinbase, pool->coinbase_len);
|
||||||
|
|
||||||
/* For encoding the block data on submission */
|
/* For encoding the block data on submission */
|
||||||
work->gbt_txns = pool->gbt_txns + 1;
|
work->gbt_txns = pool->gbt_txns + 1;
|
||||||
@ -1729,7 +1729,7 @@ static void gen_gbt_work(struct pool *pool, struct work *work)
|
|||||||
char *header = bin2hex(work->data, 128);
|
char *header = bin2hex(work->data, 128);
|
||||||
|
|
||||||
applog(LOG_DEBUG, "Generated GBT header %s", header);
|
applog(LOG_DEBUG, "Generated GBT header %s", header);
|
||||||
applog(LOG_DEBUG, "Work coinbase %s", work->gbt_coinbase);
|
applog(LOG_DEBUG, "Work coinbase %s", work->coinbase);
|
||||||
free(header);
|
free(header);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2557,7 +2557,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
|
|||||||
}
|
}
|
||||||
gbt_block = realloc_strcat(gbt_block, varint);
|
gbt_block = realloc_strcat(gbt_block, varint);
|
||||||
free(varint);
|
free(varint);
|
||||||
gbt_block = realloc_strcat(gbt_block, work->gbt_coinbase);
|
gbt_block = realloc_strcat(gbt_block, work->coinbase);
|
||||||
|
|
||||||
s = strdup("{\"id\": 0, \"method\": \"submitblock\", \"params\": [\"");
|
s = strdup("{\"id\": 0, \"method\": \"submitblock\", \"params\": [\"");
|
||||||
s = realloc_strcat(s, gbt_block);
|
s = realloc_strcat(s, gbt_block);
|
||||||
@ -3188,8 +3188,8 @@ void __copy_work(struct work *work, struct work *base_work)
|
|||||||
work->nonce2 = strdup(base_work->nonce2);
|
work->nonce2 = strdup(base_work->nonce2);
|
||||||
if (base_work->ntime)
|
if (base_work->ntime)
|
||||||
work->ntime = strdup(base_work->ntime);
|
work->ntime = strdup(base_work->ntime);
|
||||||
if (base_work->gbt_coinbase)
|
if (base_work->coinbase)
|
||||||
work->gbt_coinbase = strdup(base_work->gbt_coinbase);
|
work->coinbase = strdup(base_work->coinbase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generates a copy of an existing work struct, creating fresh heap allocations
|
/* Generates a copy of an existing work struct, creating fresh heap allocations
|
||||||
|
Loading…
Reference in New Issue
Block a user