Ok chatting with lachesis in irc he tried this and I get the same result: We added some prints in main.cpp at the SHA calls like so :
loop
{
SHA256Transform(&tmp.hash1, (char*)&tmp.block + 64, &midstate);
printf("mid hash =\n");
for (int i = 0; i < 8; i++)
printf(" %08x", ((unsigned *)&tmp.hash1)[i]);
printf("\n");
SHA256Transform(&hash, &tmp.hash1, pSHA256InitState);
printf("full hash =\n");
for (int i = 0; i < 8; i++)
printf(" %08x", ((unsigned *)&hash)[i]);
printf("\n");
if (((unsigned short*)&hash)[14] == 0)
and then in the log we get:
mid hash =
6a09e667 bb67ae85 3c6ef372 a54ff53a 510e527f 9b05688c 1f83d9ab 5be0cd19
full hash =
6a09e667 bb67ae85 3c6ef372 a54ff53a 510e527f 9b05688c 1f83d9ab 5be0cd19
mid hash =
6a09e667 bb67ae85 3c6ef372 a54ff53a 510e527f 9b05688c 1f83d9ab 5be0cd19
full hash =
6a09e667 bb67ae85 3c6ef372 a54ff53a 510e527f 9b05688c 1f83d9ab 5be0cd19
repeating! The hash call isn't doing anything!
(he maybe got a different repeating value, I don't know)