mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: remove proptest arbitrary from codec derive and tests (#8968)
This commit is contained in:
@ -39,8 +39,6 @@ snap = "1.0.5"
|
||||
|
||||
# arbitrary utils
|
||||
arbitrary = { workspace = true, features = ["derive"], optional = true }
|
||||
proptest = { workspace = true, optional = true }
|
||||
proptest-derive = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
reth-net-common.workspace = true
|
||||
@ -58,6 +56,7 @@ secp256k1 = { workspace = true, features = [
|
||||
|
||||
arbitrary = { workspace = true, features = ["derive"] }
|
||||
proptest.workspace = true
|
||||
proptest-arbitrary-interop.workspace = true
|
||||
proptest-derive.workspace = true
|
||||
async-stream.workspace = true
|
||||
|
||||
@ -66,8 +65,6 @@ default = ["serde"]
|
||||
arbitrary = [
|
||||
"reth-primitives/arbitrary",
|
||||
"dep:arbitrary",
|
||||
"dep:proptest",
|
||||
"dep:proptest-derive",
|
||||
]
|
||||
optimism = ["reth-primitives/optimism"]
|
||||
serde = ["dep:serde"]
|
||||
|
||||
@ -129,22 +129,6 @@ impl<'a> arbitrary::Arbitrary<'a> for Capability {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "arbitrary"))]
|
||||
impl proptest::arbitrary::Arbitrary for Capability {
|
||||
type Parameters = proptest::arbitrary::ParamsFor<String>;
|
||||
fn arbitrary_with(args: Self::Parameters) -> Self::Strategy {
|
||||
use proptest::strategy::Strategy;
|
||||
proptest::arbitrary::any_with::<String>(args) // TODO: what possible values?
|
||||
.prop_flat_map(move |name| {
|
||||
proptest::arbitrary::any_with::<usize>(()) // TODO: What's the max?
|
||||
.prop_map(move |version| Self::new(name.clone(), version))
|
||||
})
|
||||
.boxed()
|
||||
}
|
||||
|
||||
type Strategy = proptest::strategy::BoxedStrategy<Self>;
|
||||
}
|
||||
|
||||
/// Represents all capabilities of a node.
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct Capabilities {
|
||||
|
||||
Reference in New Issue
Block a user