Fix earning not shown
@@ -1653,11 +1653,7 @@ int xdag_print_block_info(xdag_hash_t hash, FILE *out)
n += i;
}
- if (!n) {
- free(ba);
- return 0;
- }
-
+ if (n) {
qsort(ba, n, sizeof(struct block_internal *), bi_compar);
for (i = 0; i < n; ++i) {
@@ -1676,6 +1672,7 @@ int xdag_print_block_info(xdag_hash_t hash, FILE *out)
}
}
}
+ }
free(ba);
