MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / HasCollision

Function HasCollision

src/crypto/equihash.cpp:295–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293
294template<size_t WIDTH>
295bool HasCollision(StepRow<WIDTH>& a, StepRow<WIDTH>& b, size_t l)
296{
297 // This doesn't need to be constant time.
298 for (size_t j = 0; j < l; j++) {
299 if (a.hash[j] != b.hash[j])
300 return false;
301 }
302 return true;
303}
304
305template<size_t WIDTH>
306TruncatedStepRow<WIDTH>::TruncatedStepRow(const unsigned char* hashIn, size_t hInLen,

Callers 4

BasicSolveMethod · 0.85
CollideBranchesFunction · 0.85
OptimisedSolveMethod · 0.85
IsValidSolutionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected