Only compare the first n/(k+1) bits when sorting
This commit is contained in:
parent
dd74e9dd32
commit
d151ab4fea
|
@ -210,7 +210,7 @@ std::set<std::vector<eh_index>> Equihash<N,K>::BasicSolve(const eh_HashState& ba
|
||||||
LogPrint("pow", "Round %d:\n", r);
|
LogPrint("pow", "Round %d:\n", r);
|
||||||
// 2a) Sort the list
|
// 2a) Sort the list
|
||||||
LogPrint("pow", "- Sorting list\n");
|
LogPrint("pow", "- Sorting list\n");
|
||||||
std::sort(X.begin(), X.end(), CompareSR(hashLen));
|
std::sort(X.begin(), X.end(), CompareSR(CollisionByteLength));
|
||||||
|
|
||||||
LogPrint("pow", "- Finding collisions\n");
|
LogPrint("pow", "- Finding collisions\n");
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -360,7 +360,7 @@ std::set<std::vector<eh_index>> Equihash<N,K>::OptimisedSolve(const eh_HashState
|
||||||
LogPrint("pow", "Round %d:\n", r);
|
LogPrint("pow", "Round %d:\n", r);
|
||||||
// 2a) Sort the list
|
// 2a) Sort the list
|
||||||
LogPrint("pow", "- Sorting list\n");
|
LogPrint("pow", "- Sorting list\n");
|
||||||
std::sort(Xt.begin(), Xt.end(), CompareSR(hashLen));
|
std::sort(Xt.begin(), Xt.end(), CompareSR(CollisionByteLength));
|
||||||
|
|
||||||
LogPrint("pow", "- Finding collisions\n");
|
LogPrint("pow", "- Finding collisions\n");
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
Loading…
Reference in New Issue