diff --git a/zebra-consensus/src/config.rs b/zebra-consensus/src/config.rs index c2cc914ba9d..709c73ddff2 100644 --- a/zebra-consensus/src/config.rs +++ b/zebra-consensus/src/config.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; /// Configuration for parallel semantic verification: /// -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde( deny_unknown_fields, default, diff --git a/zebra-network/src/config.rs b/zebra-network/src/config.rs index 402ee6fc4cc..1f7cc2d804d 100644 --- a/zebra-network/src/config.rs +++ b/zebra-network/src/config.rs @@ -46,7 +46,7 @@ pub use cache_dir::CacheDir; const MAX_SINGLE_SEED_PEER_DNS_RETRIES: usize = 0; /// Configuration for networking code. -#[derive(Clone, Debug, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { /// The address on which this node should listen for connections. diff --git a/zebra-rpc/src/config.rs b/zebra-rpc/src/config.rs index b5b4569f74a..b6bbf5196ef 100644 --- a/zebra-rpc/src/config.rs +++ b/zebra-rpc/src/config.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; pub mod mining; /// RPC configuration section. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { /// IP address and port for the RPC server. diff --git a/zebra-scan/src/config.rs b/zebra-scan/src/config.rs index b2bea3303bd..cda7e4910af 100644 --- a/zebra-scan/src/config.rs +++ b/zebra-scan/src/config.rs @@ -7,7 +7,7 @@ use zebra_state::Config as DbConfig; use crate::storage::SaplingScanningKey; -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] /// Configuration for scanning. pub struct Config { diff --git a/zebra-scan/src/storage.rs b/zebra-scan/src/storage.rs index 706c5cd424f..8bcd0f2363f 100644 --- a/zebra-scan/src/storage.rs +++ b/zebra-scan/src/storage.rs @@ -19,6 +19,7 @@ pub type SaplingScanningKey = String; /// `rocksdb` allows concurrent writes through a shared reference, /// so clones of the scanner storage represent the same database instance. /// When the final clone is dropped, the database is closed. +#[derive(Clone, Debug)] pub struct Storage { // Configuration // diff --git a/zebra-state/src/config.rs b/zebra-state/src/config.rs index 5a688569f73..775b41f4283 100644 --- a/zebra-state/src/config.rs +++ b/zebra-state/src/config.rs @@ -20,7 +20,7 @@ use crate::{ }; /// Configuration for the state service. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { /// The root directory for storing cached block data. diff --git a/zebrad/src/components/mempool/config.rs b/zebrad/src/components/mempool/config.rs index 2b4f20f6a1b..7f2163f376f 100644 --- a/zebrad/src/components/mempool/config.rs +++ b/zebrad/src/components/mempool/config.rs @@ -5,7 +5,7 @@ use std::time::Duration; use serde::{Deserialize, Serialize}; /// Mempool configuration section. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { /// The mempool transaction cost limit. diff --git a/zebrad/src/components/metrics.rs b/zebrad/src/components/metrics.rs index fd41e3699d3..ab6ba6f774e 100644 --- a/zebrad/src/components/metrics.rs +++ b/zebrad/src/components/metrics.rs @@ -59,7 +59,7 @@ impl MetricsEndpoint { } /// Metrics configuration section. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { /// The address used for the Prometheus metrics endpoint. diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index db98a1de8e3..b3a05484f9c 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -220,7 +220,7 @@ const SYNC_RESTART_DELAY: Duration = Duration::from_secs(67); const GENESIS_TIMEOUT_RETRY: Duration = Duration::from_secs(10); /// Sync configuration section. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { /// The number of parallel block download requests. diff --git a/zebrad/src/config.rs b/zebrad/src/config.rs index 175ed8b8e8f..b6e0af2778c 100644 --- a/zebrad/src/config.rs +++ b/zebrad/src/config.rs @@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize}; /// The `zebrad` config is a TOML-encoded version of this structure. The meaning /// of each field is described in the documentation, although it may be necessary /// to click through to the sub-structures for each section. -#[derive(Clone, Default, Debug, Deserialize, Serialize)] +#[derive(Clone, Default, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct ZebradConfig { /// Consensus configuration