Skip to content

secp256k1: Add GeneratePrivateKeyFromRand tests.#3100

Merged
davecgh merged 1 commit intodecred:masterfrom
davecgh:secp256k1_genprivkey_tests
Apr 13, 2023
Merged

secp256k1: Add GeneratePrivateKeyFromRand tests.#3100
davecgh merged 1 commit intodecred:masterfrom
davecgh:secp256k1_genprivkey_tests

Conversation

@davecgh
Copy link
Copy Markdown
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
Copy Markdown
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