Need more/better TestEquihashValidator vectors #1825

Open
solardiz opened this Issue Nov 8, 2016 · 0 comments

Projects

None yet

1 participant

@solardiz
solardiz commented Nov 8, 2016

As discussed with @str4d, we need to more thoroughly test IsValidSolution(), in particular with duplicate indices. The current two expected-failure tests for duplicate indices are for trivial special cases, and they might not detect some plausible bugs in the dupe check.

We need to add some test vectors with just one pair of non-adjacent duplicate indices per test vector, and such that they would be expected to pass validation if it were not for the dupe check.

We also need to have the tests distinguish between the different "return false;" and require that the expected one be triggered. This requires a change to the function prototype or some out-of-band means to communicate this detail specifically to the unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment