Skip to content

Commit

Permalink
Validation fix, finally working!
Browse files Browse the repository at this point in the history
  • Loading branch information
omaralvarez committed Oct 28, 2016
1 parent 1bcebc1 commit 2721811
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/libzogminer/gpusolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ bool GPUSolver::GPUSolve200_9(uint8_t *header, size_t header_len, uint64_t nonce
uint64_t ptr;
miner->run(header, header_len, nonce, indices, &n_sol, &ptr);

uint256 nNonce = ArithToUint256(ptr);
crypto_generichash_blake2b_update(&base_state,
nNonce.begin(),
nNonce.size());

auto d = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - t);
auto milis = std::chrono::duration_cast<std::chrono::milliseconds>(d).count();

Expand Down Expand Up @@ -209,10 +214,6 @@ bool GPUSolver::GPUSolve200_9(uint8_t *header, size_t header_len, uint64_t nonce
std::vector<unsigned char> sol_char = GetMinimalFromIndices(index_vector, DIGITBITS);
#ifdef DEBUG
bool isValid;
uint256 nNonce = ArithToUint256(ptr);
crypto_generichash_blake2b_update(&base_state,
nNonce.begin(),
nNonce.size());
LogPrint("pow", "Checking with = %s\n",
nNonce.ToString());
EhIsValidSolution(200, 9, base_state, sol_char, isValid);
Expand Down

0 comments on commit 2721811

Please sign in to comment.