diff --git a/src/crypto/equihash.cpp b/src/crypto/equihash.cpp index ea64e5f6b..b387a75b0 100644 --- a/src/crypto/equihash.cpp +++ b/src/crypto/equihash.cpp @@ -501,6 +501,7 @@ bool Equihash::OptimisedSolve(const eh_HashState& base_state, // Now for each solution run the algorithm again to recreate the indices LogPrint("pow", "Culling solutions\n"); for (std::shared_ptr partialSoln : partialSolns) { + std::set> solns; size_t hashLen; size_t lenIndices; std::vector>>> X; @@ -562,7 +563,10 @@ bool Equihash::OptimisedSolve(const eh_HashState& base_state, // We are at the top of the tree assert(X.size() == K+1); for (FullStepRow row : *X[K]) { - if (validBlock(row.GetIndices(hashLen, lenIndices))) + solns.insert(row.GetIndices(hashLen, lenIndices)); + } + for (auto soln : solns) { + if (validBlock(soln)) return true; } if (cancelled(PartialEnd)) throw solver_cancelled;