diff --git a/stratum/algos/zr5.c b/stratum/algos/zr5.c index be196ba..ffb98e9 100644 --- a/stratum/algos/zr5.c +++ b/stratum/algos/zr5.c @@ -1,8 +1,7 @@ -#include "x15.h" +#include #include #include #include -#include #include "../sha3/sph_blake.h" #include "../sha3/sph_groestl.h" @@ -10,6 +9,8 @@ #include "../sha3/sph_keccak.h" #include "../sha3/sph_skein.h" +//#define TEST_VERBOSELY + #define ZR_BLAKE 0 #define ZR_GROESTL 1 #define ZR_JH 2 @@ -47,7 +48,7 @@ static const int permut[][4] = { {3, 2, 1, 0} }; -void zr5_hash(const char* input, char* output, uint32_t len) +static void zr5_hash_512(const char* input, char* output, uint32_t len) { sph_keccak512_context ctx_keccak; sph_blake512_context ctx_blake; @@ -65,15 +66,16 @@ void zr5_hash(const char* input, char* output, uint32_t len) unsigned int norder = hash[0][0] % ARRAY_SIZE(permut); /* % 24 */ int i; +#ifdef TEST_VERBOSELY for(i=0; iextranonce1, extranonce2, ntime, nonce); - if(submitvalues.hash_bin[30] || submitvalues.hash_bin[31]) + // zr5 has data here, ignore it... reversed endian ? + if((submitvalues.hash_bin[30] || submitvalues.hash_bin[31]) && g_current_algo && strcmp(g_current_algo->name, "zr5")) { client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); return true;