Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 1b44f27

Browse files
authored
Merge pull request #92 from spacemeshos/fix-test-pow
Zerout hash array and use COMPUTE_LEAFS mode to get the label
2 parents 949f875 + 83bd74e commit 1b44f27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ int do_test_pow(uint64_t aStartPos, int aLabelsCount, unsigned aDiff, unsigned a
461461
printf("%u hashes, %u h/s, solution at %u\n", (uint32_t)hashes_computed, (uint32_t)hashes_per_sec, (uint32_t)idx_solution);
462462
if (-1 != cpu_id) {
463463
uint8_t hash[32];
464-
scryptPositions(cpu_id, s_id, idx_solution, idx_solution, 256, s_salt, SPACEMESH_API_COMPUTE_POW, hash, 512, 1, 1, NULL, NULL, &hashes_computed, &hashes_per_sec);
464+
memset(hash, 0, sizeof(hash));
465+
scryptPositions(cpu_id, s_id, idx_solution, idx_solution, 256, s_salt, SPACEMESH_API_COMPUTE_LEAFS, hash, 512, 1, 1, NULL, NULL, &hashes_computed, &hashes_per_sec);
465466
printf("id: ");
466467
print_hex32(s_id);
467468
printf("\n");

0 commit comments

Comments
 (0)