Eliminate probably duplicates in final round

This is more likely to eliminate valid solutions than doing so in intermediate
rounds, but the probability is still very low.
This commit is contained in:
Jack Grigg 2016-08-05 18:15:34 +12:00
parent 6b4f4475a5
commit 3c654f38eb
1 changed files with 6 additions and 2 deletions

View File

@ -487,8 +487,12 @@ bool Equihash<N,K>::OptimisedSolve(const eh_HashState& base_state,
for (int l = 0; l < j - 1; l++) {
for (int m = l + 1; m < j; m++) {
TruncatedStepRow<FinalTruncatedWidth> res(Xt[i+l], Xt[i+m], hashLen, lenIndices, 0);
partialSolns.push_back(res.GetTruncatedIndices(hashLen, 2*lenIndices));
TruncatedStepRow<FinalTruncatedWidth> res(Xt[i+l], Xt[i+m],
hashLen, lenIndices, 0);
auto soln = res.GetTruncatedIndices(hashLen, 2*lenIndices);
if (!IsProbablyDuplicate<soln_size>(soln, 2*lenIndices)) {
partialSolns.push_back(soln);
}
}
}