mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Feature-gate all uses of arbitrary (#8867)
Feature gate all uses of `arbitrary` so it is not compiled during release builds. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -7,10 +7,11 @@ edition = "2021"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
arbitrary = ["dep:arbitrary"]
|
||||
fake_crypto = []
|
||||
|
||||
[dependencies]
|
||||
arbitrary = { workspace = true }
|
||||
arbitrary = { workspace = true, optional = true }
|
||||
c-kzg = { workspace = true }
|
||||
educe = { workspace = true }
|
||||
ethereum_hashing = { workspace = true }
|
||||
|
||||
@@ -114,6 +114,7 @@ impl Debug for KzgCommitment {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "arbitrary")]
|
||||
impl arbitrary::Arbitrary<'_> for KzgCommitment {
|
||||
fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result<Self> {
|
||||
let mut bytes = [0u8; BYTES_PER_COMMITMENT];
|
||||
|
||||
@@ -110,6 +110,7 @@ impl Debug for KzgProof {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "arbitrary")]
|
||||
impl arbitrary::Arbitrary<'_> for KzgProof {
|
||||
fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result<Self> {
|
||||
let mut bytes = [0u8; BYTES_PER_PROOF];
|
||||
|
||||
Reference in New Issue
Block a user