Skip to content

Commit cb80307

Browse files
committed
Merge branch '0.2.x'
2 parents a1d3b2e + 3931f05 commit cb80307

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/datum_api.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,6 @@ bool datum_api_check_admin_password_httponly(struct MHD_Connection * const conne
444444
}
445445

446446
bool datum_api_check_admin_password(struct MHD_Connection * const connection, const json_t * const j) {
447-
int ret;
448-
449447
const json_t * const j_password = json_object_get(j, "password");
450448
if (json_is_string(j_password)) {
451449
return datum_api_check_admin_password_only(connection, json_string_value(j_password));
@@ -604,7 +602,7 @@ int datum_api_cmd(struct MHD_Connection *connection, char *post, int len) {
604602

605603
param = json_object_get(root, "empty_thread");
606604
if (param) {
607-
const int tid = datum_atoi_strict(json_string_value(param), json_string_length(param));
605+
tid = datum_atoi_strict(json_string_value(param), json_string_length(param));
608606
if (tid != -1) {
609607
datum_api_cmd_empty_thread(tid);
610608
redirect = "/threads";

src/datum_blocktemplates.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ void *datum_gateway_template_thread(void *args) {
435435

436436
if (t) {
437437
datum_blocktemplates_error = NULL;
438-
DLOG_DEBUG("height: %d / value: %"PRIu64,t->height, t->coinbasevalue);
438+
DLOG_DEBUG("height: %lu / value: %"PRIu64, (unsigned long)t->height, t->coinbasevalue);
439439
DLOG_DEBUG("--- prevhash: %s", t->previousblockhash);
440440
DLOG_DEBUG("--- txn_count: %u / sigops: %u / weight: %u / size: %u", t->txn_count, t->txn_total_sigops, t->txn_total_weight, t->txn_total_size);
441441

@@ -445,7 +445,7 @@ void *datum_gateway_template_thread(void *args) {
445445
update_stratum_job(t,true,JOB_STATE_EMPTY_PLUS);
446446
strcpy(p1, t->previousblockhash);
447447
was_notified = false;
448-
DLOG_INFO("NEW NETWORK BLOCK: %s (%d)",t->previousblockhash,t->height);
448+
DLOG_INFO("NEW NETWORK BLOCK: %s (%lu)", t->previousblockhash, (unsigned long)t->height);
449449

450450
// sleep for a milisecond
451451
// this will let other threads churn for a moment. we wont get all the empty jobs blasted out in a milisecond anyway
@@ -484,7 +484,7 @@ void *datum_gateway_template_thread(void *args) {
484484
if (!was_notified) {
485485
DLOG_DEBUG("Multi notified for block we knew details about. (%s)", new_notify_blockhash);
486486
} else {
487-
DLOG_DEBUG("Notified, however new = %s, t->previousblockhash = %s, t->height = %d, new_notify_height = %d", new_notify_blockhash, t->previousblockhash, t->height, new_notify_height);
487+
DLOG_DEBUG("Notified, however new = %s, t->previousblockhash = %s, t->height = %lu, new_notify_height = %d", new_notify_blockhash, t->previousblockhash, (unsigned long)t->height, new_notify_height);
488488

489489
// Sometimes we call GBT before we get the signal from a blocknotify. It's a bit of a race condition.
490490
// Instead of freaking out, we'll just ignore things when we get a signal that results in the same block if it was

src/datum_gateway.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353

5454
#define MAX_COINBASE_TXN_SIZE_BYTES (((STRATUM_COINBASE1_MAX_LEN+STRATUM_COINBASE2_MAX_LEN)>>1)+64)
5555

56-
#define STRATUM_JOB_INDEX_XOR 0xC0DE
56+
#define STRATUM_JOB_INDEX_XOR ((uint16_t)0xC0DE)
5757

5858
#endif

src/datum_stratum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void datum_stratum_v1_shutdown_all(void) {
121121
pthread_mutex_unlock(&global_stratum_app->datum_threads[tid].thread_data_lock);
122122
}
123123

124-
DLOG_INFO("Sent disconnect request for all stratum clients to %d threads.", shutdown_threads);
124+
DLOG_INFO("Sent disconnect request for all stratum clients to %u threads.", shutdown_threads);
125125
return;
126126
}
127127

@@ -1431,7 +1431,7 @@ int send_mining_notify(T_DATUM_CLIENT_DATA *c, bool clean, bool quickdiff, bool
14311431
T_DATUM_MINER_DATA * const m = c->app_client_data;
14321432
T_DATUM_STRATUM_COINBASE *cb;
14331433
char cb1[STRATUM_COINBASE1_MAX_LEN+2];
1434-
int cbselect = 0;
1434+
unsigned int cbselect = 0;
14351435
bool full_coinbase = false;
14361436
char s[512];
14371437
unsigned char tdiff = 0xFF;

0 commit comments

Comments
 (0)