Rename work gbt_coinbase to coinbase to be in line with pool variable name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/cgminer.c b/cgminer.c
index 42f58b7..85d44e8 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1552,7 +1552,7 @@ void clean_work(struct work *work)
free(work->job_id);
free(work->nonce2);
free(work->ntime);
- free(work->gbt_coinbase);
+ free(work->coinbase);
free(work->nonce1);
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);
- work->gbt_coinbase = bin2hex(pool->coinbase, pool->coinbase_len);
+ work->coinbase = bin2hex(pool->coinbase, pool->coinbase_len);
/* For encoding the block data on submission */
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);
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);
}
@@ -2557,7 +2557,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
}
gbt_block = realloc_strcat(gbt_block, 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 = 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);
if (base_work->ntime)
work->ntime = strdup(base_work->ntime);
- if (base_work->gbt_coinbase)
- work->gbt_coinbase = strdup(base_work->gbt_coinbase);
+ if (base_work->coinbase)
+ work->coinbase = strdup(base_work->coinbase);
}
/* Generates a copy of an existing work struct, creating fresh heap allocations
diff --git a/miner.h b/miner.h
index 2b0a541..43c7f10 100644
--- a/miner.h
+++ b/miner.h
@@ -1261,7 +1261,7 @@ struct work {
char *nonce1;
bool gbt;
- char *gbt_coinbase;
+ char *coinbase;
int gbt_txns;
unsigned int work_block;