Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds two patches that expose feature flags from the underlying
secp256k1
library.The primary benefit here is that we can activate the
rand
feature from a crate that only depends onrust-bitcoin
but would like to make use of the feature-gatedrand
functionality insecp256k1
. The current workaround here is to add an additional dependency onsecp256k1
that includes the feature flag. This works because cargo accumulates feature flags across the dependency tree.Unfortunately, this requires to activately keep those versions in sync. By giving access to the
rand
feature flag ofsecp256k1
through arand
feature flag inrust-bitcoin
, this situation can be avoided.Additionally, I noticed that the
serde
feature insecp256k1
is not included in theuse-serde
feature ofrust-bitcoin
. The 2nd patch fixes this.