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

secp256k1: Add GeneratePrivateKeyFromRand tests. #3100

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Apr 13, 2023

This adds tests for the newly added GeneratePrivateKeyFromRand func to restore test coverage.

It also takes advantage of the ability to specify the random source to inject faults to improve the test coverage of private key generation in general to achieve 100% branch coverage.

@davecgh davecgh added this to the 1.8.0 milestone Apr 13, 2023
Copy link
Member

@jrick jrick left a comment

Choose a reason for hiding this comment

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

no test that the func panics when passing nil? 😝

This adds tests for the newly added GeneratePrivateKeyFromRand func to
restore test coverage.

It also takes advantage of the ability to specify the random source to
inject faults to improve the test coverage of private key generation in
general to achieve 100% branch coverage.
@davecgh davecgh force-pushed the secp256k1_genprivkey_tests branch from 55f8d8b to 6c5b953 Compare April 13, 2023 20:15
@davecgh davecgh merged commit 6c5b953 into decred:master Apr 13, 2023
@davecgh davecgh deleted the secp256k1_genprivkey_tests branch April 13, 2023 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants