From 820db4e36727f858fc7e32f2e96ece06d9806568 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Wed, 3 Feb 2016 16:45:56 +1100 Subject: [PATCH] Write to correct merklebin offset --- src/stratifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index c3a9ade5..eddd1d54 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1212,9 +1212,9 @@ static void wb_merkle_bins(sdata_t *sdata, workbase_t *wb, json_t *txn_array) while (42) { if (binleft == 1) break; - memcpy(&wb->merklebin[i][0], hashbin + 32, 32); - __bin2hex(&wb->merklehash[wb->merkles][0], &wb->merklebin[i][0], 32); - json_array_append_new(wb->merkle_array, json_string(&wb->merklehash[i][0])); + memcpy(&wb->merklebin[wb->merkles][0], hashbin + 32, 32); + __bin2hex(&wb->merklehash[wb->merkles][0], &wb->merklebin[wb->merkles][0], 32); + json_array_append_new(wb->merkle_array, json_string(&wb->merklehash[wb->merkles][0])); LOGDEBUG("MH%d %s",wb->merkles, &wb->merklehash[wb->merkles][0]); wb->merkles++; if (binleft % 2) {