Browse Source

Write to correct merklebin offset

master
ckolivas 9 years ago
parent
commit
820db4e367
  1. 6
      src/stratifier.c

6
src/stratifier.c

@ -1212,9 +1212,9 @@ static void wb_merkle_bins(sdata_t *sdata, workbase_t *wb, json_t *txn_array)
while (42) { while (42) {
if (binleft == 1) if (binleft == 1)
break; break;
memcpy(&wb->merklebin[i][0], hashbin + 32, 32); memcpy(&wb->merklebin[wb->merkles][0], hashbin + 32, 32);
__bin2hex(&wb->merklehash[wb->merkles][0], &wb->merklebin[i][0], 32); __bin2hex(&wb->merklehash[wb->merkles][0], &wb->merklebin[wb->merkles][0], 32);
json_array_append_new(wb->merkle_array, json_string(&wb->merklehash[i][0])); 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]); LOGDEBUG("MH%d %s",wb->merkles, &wb->merklehash[wb->merkles][0]);
wb->merkles++; wb->merkles++;
if (binleft % 2) { if (binleft % 2) {

Loading…
Cancel
Save