|
|
@ -1101,6 +1101,9 @@ static bool add_txn(ckpool_t *ckp, sdata_t *sdata, txntable_t **txns, const char |
|
|
|
|
|
|
|
|
|
|
|
txn = ckzalloc(sizeof(txntable_t)); |
|
|
|
txn = ckzalloc(sizeof(txntable_t)); |
|
|
|
memcpy(txn->hash, hash, 65); |
|
|
|
memcpy(txn->hash, hash, 65); |
|
|
|
|
|
|
|
if (local) |
|
|
|
|
|
|
|
txn->data = strdup(data); |
|
|
|
|
|
|
|
else { |
|
|
|
/* Get the data from our local bitcoind as a way of confirming it
|
|
|
|
/* Get the data from our local bitcoind as a way of confirming it
|
|
|
|
* already knows about this transaction. */ |
|
|
|
* already knows about this transaction. */ |
|
|
|
txn->data = generator_get_txn(ckp, hash); |
|
|
|
txn->data = generator_get_txn(ckp, hash); |
|
|
@ -1110,6 +1113,8 @@ static bool add_txn(ckpool_t *ckp, sdata_t *sdata, txntable_t **txns, const char |
|
|
|
submit_transaction(ckp, data); |
|
|
|
submit_transaction(ckp, data); |
|
|
|
txn->data = strdup(data); |
|
|
|
txn->data = strdup(data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!local || ckp->node) |
|
|
|
if (!local || ckp->node) |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
else |
|
|
|
else |
|
|
|