From 24bb6590d6327ffcaf2cf96a09abea82eec520f5 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 21 Nov 2019 11:58:40 +1100 Subject: [PATCH 1/2] Expose secp256k1 'rand' feature flag By exposing this, we can use the 'rand' dependency of secp256k1 in a project that only depends on rust-bitcoin without having to add a separate dependency in order to activate the feature flag. --- Cargo.toml | 1 + contrib/test.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a951195a..85e6c0ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ path = "src/lib.rs" fuzztarget = ["secp256k1/fuzztarget", "bitcoin_hashes/fuzztarget"] unstable = [] use-serde = ["serde", "bitcoin_hashes/serde"] +rand = ["secp256k1/rand"] [dependencies] bech32 = "0.7.1" diff --git a/contrib/test.sh b/contrib/test.sh index 7c5ed1e7..de1cb3ec 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -1,6 +1,6 @@ #!/bin/sh -ex -FEATURES="bitcoinconsensus use-serde" +FEATURES="bitcoinconsensus use-serde rand" if [ "$DO_COV" = true ] then From 7be4ac04036eeef10963efc409114ea142263467 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 21 Nov 2019 11:59:52 +1100 Subject: [PATCH 2/2] Include secp256k1 'serde' feature flag in 'use-serde' feature --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 85e6c0ba..957b16a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ path = "src/lib.rs" [features] fuzztarget = ["secp256k1/fuzztarget", "bitcoin_hashes/fuzztarget"] unstable = [] -use-serde = ["serde", "bitcoin_hashes/serde"] +use-serde = ["serde", "bitcoin_hashes/serde", "secp256k1/serde"] rand = ["secp256k1/rand"] [dependencies]