|
|
@ -1101,15 +1101,20 @@ 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); |
|
|
|
/* Get the data from our local bitcoind as a way of confirming it
|
|
|
|
if (local) |
|
|
|
* already knows about this transaction. */ |
|
|
|
|
|
|
|
txn->data = generator_get_txn(ckp, hash); |
|
|
|
|
|
|
|
if (!txn->data) { |
|
|
|
|
|
|
|
/* If our local bitcoind hasn't seen this transaction,
|
|
|
|
|
|
|
|
* submit it for mempools to be ~synchronised */ |
|
|
|
|
|
|
|
submit_transaction(ckp, data); |
|
|
|
|
|
|
|
txn->data = strdup(data); |
|
|
|
txn->data = strdup(data); |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
/* Get the data from our local bitcoind as a way of confirming it
|
|
|
|
|
|
|
|
* already knows about this transaction. */ |
|
|
|
|
|
|
|
txn->data = generator_get_txn(ckp, hash); |
|
|
|
|
|
|
|
if (!txn->data) { |
|
|
|
|
|
|
|
/* If our local bitcoind hasn't seen this transaction,
|
|
|
|
|
|
|
|
* submit it for mempools to be ~synchronised */ |
|
|
|
|
|
|
|
submit_transaction(ckp, data); |
|
|
|
|
|
|
|
txn->data = strdup(data); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!local || ckp->node) |
|
|
|
if (!local || ckp->node) |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
txn->refcount = REFCOUNT_REMOTE; |
|
|
|
else |
|
|
|
else |
|
|
|