fix: derive arbitrary for tests (#9167)

This commit is contained in:
Matthias Seitz
2024-06-28 13:24:58 +02:00
committed by GitHub
parent 87cdfb185e
commit 3bf3b9e3ec
2 changed files with 3 additions and 3 deletions

View File

@ -489,7 +489,7 @@ impl Decodable for Header {
}
}
#[cfg(feature = "arbitrary")]
#[cfg(any(test, feature = "test-utils", feature = "arbitrary"))]
impl<'a> arbitrary::Arbitrary<'a> for Header {
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
// Generate an arbitrary header, passing it to the generate_valid_header function to make

View File

@ -171,7 +171,7 @@ impl Block {
}
}
#[cfg(feature = "arbitrary")]
#[cfg(any(test, feature = "arbitrary"))]
impl<'a> arbitrary::Arbitrary<'a> for Block {
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
// first generate up to 100 txs
@ -614,7 +614,7 @@ impl From<Block> for BlockBody {
}
}
#[cfg(feature = "arbitrary")]
#[cfg(any(test, feature = "arbitrary"))]
impl<'a> arbitrary::Arbitrary<'a> for BlockBody {
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
// first generate up to 100 txs