From 1682d8e0f32bbba9c5144de5ad18d98c7c2d8d2c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 17 Jun 2014 10:45:28 +1000 Subject: [PATCH] Cope with empty transactions in json encoding --- src/stratifier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 3f6a47c3..6afad0b2 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -516,7 +516,8 @@ static void update_base(ckpool_t *ckp) if (wb->transactions) { json_strdup(&wb->txn_data, val, "txn_data"); json_strdup(&wb->txn_hashes, val, "txn_hashes"); - } + } else + wb->txn_hashes = ckzalloc(1); json_intcpy(&wb->merkles, val, "merkles"); wb->merkle_array = json_array(); if (wb->merkles) {