|
|
@ -1631,6 +1631,8 @@ static bool rebuild_txns(ckpool_t *ckp, sdata_t *sdata, workbase_t *wb, json_t * |
|
|
|
/* See if we can find it in our local bitcoind */ |
|
|
|
/* See if we can find it in our local bitcoind */ |
|
|
|
data = generator_get_txn(ckp, hash); |
|
|
|
data = generator_get_txn(ckp, hash); |
|
|
|
if (!data) { |
|
|
|
if (!data) { |
|
|
|
|
|
|
|
txn_val = json_string(hash); |
|
|
|
|
|
|
|
json_array_append_new(missing_txns, txn_val); |
|
|
|
ret = false; |
|
|
|
ret = false; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
@ -1646,10 +1648,11 @@ static bool rebuild_txns(ckpool_t *ckp, sdata_t *sdata, workbase_t *wb, json_t * |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
HASH_ADD_STR(sdata->txns, hash, txn); |
|
|
|
HASH_ADD_STR(sdata->txns, hash, txn); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
txn_val = json_string(hash); |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
json_array_append_new(missing_txns, txn_val); |
|
|
|
txn->seen = true; |
|
|
|
ret = false; |
|
|
|
JSON_CPACK(txn_val, "{ss,ss}", |
|
|
|
free(data); |
|
|
|
"hash", hash, "data", txn->data); |
|
|
|
|
|
|
|
json_array_append_new(txn_array, txn_val); |
|
|
|
} |
|
|
|
} |
|
|
|
ck_wunlock(&sdata->workbase_lock); |
|
|
|
ck_wunlock(&sdata->workbase_lock); |
|
|
|
} |
|
|
|
} |
|
|
|