Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests][BUG] Fix random range in feature_blockhashcache #2144

Merged

Conversation

random-zebra
Copy link

random.randint is an alias for randrange, which includes the endpoint:
https://github.com/python/cpython/blob/998ae1fa3fb05a790071217cf8f6ae3a928da13f/Lib/random.py#L371-L375

In the test, we want a number strictly below 200, so we either use randint(1, 199) or randrange(1, 200).

This fixes the GA failures like https://github.com/PIVX-Project/PIVX/runs/1714017123

@random-zebra random-zebra added this to the 5.1.0 milestone Jan 17, 2021
@random-zebra random-zebra self-assigned this Jan 17, 2021
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, utACK faf80c6

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK faf80c6

@furszy furszy merged commit f60b8a5 into PIVX-Project:master Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants