From 4718cea30af47963aa55dcc4c452b9b2f9768ff8 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 16 Jun 2017 16:20:48 +1000 Subject: [PATCH] Pack txns that are found when rechecking into the txn_array which will be used by wb_merkle_bin_txns. --- src/stratifier.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 6d624cb7..07b615ff 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1623,17 +1623,16 @@ static bool rebuild_txns(ckpool_t *ckp, sdata_t *sdata, workbase_t *wb) txn = ckzalloc(sizeof(txntable_t)); memcpy(txn->hash, hash, 65); txn->data = data; - txn->refcount = REFCOUNT_REMOTE; HASH_ADD_STR(sdata->txns, hash, txn); sdata->txns_generated++; } else { free(data); - txn->refcount = REFCOUNT_REMOTE; - txn->seen = true; - JSON_CPACK(txn_val, "{ss,ss}", - "hash", hash, "data", txn->data); - json_array_append_new(txn_array, txn_val); } + txn->refcount = REFCOUNT_REMOTE; + txn->seen = true; + JSON_CPACK(txn_val, "{ss,ss}", + "hash", hash, "data", txn->data); + json_array_append_new(txn_array, txn_val); ck_wunlock(&sdata->txn_lock); }