From 089b0440c1bd6a6a846ea56ca3d0dffcde5076f3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 5 Feb 2016 18:02:26 +1100 Subject: [PATCH] Increase refcount when sent a duplicate transaction on nodes --- src/stratifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 65c77544..36673a6a 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -6319,8 +6319,10 @@ static void add_node_txns(sdata_t *sdata, const json_t *val) continue; } HASH_FIND_STR(sdata->txns, hash, txn); - if (txn) + if (txn) { + txn->refcount++; continue; + } txn = ckzalloc(sizeof(txntable_t)); memcpy(txn->hash, hash, 65); txn->data = strdup(data);