diff --git a/roles/jd-client/src/lib/downstream.rs b/roles/jd-client/src/lib/downstream.rs index 92e5a874a7..82a8076022 100644 --- a/roles/jd-client/src/lib/downstream.rs +++ b/roles/jd-client/src/lib/downstream.rs @@ -39,6 +39,7 @@ pub struct DownstreamMiningNode { receiver: Receiver, sender: Sender, pub status: DownstreamMiningNodeStatus, + #[allow(dead_code)] pub prev_job_id: Option, solution_sender: Sender>, withhold: bool, diff --git a/roles/jd-client/src/lib/error.rs b/roles/jd-client/src/lib/error.rs index c3e24bd4d3..f29decb3d6 100644 --- a/roles/jd-client/src/lib/error.rs +++ b/roles/jd-client/src/lib/error.rs @@ -6,6 +6,7 @@ use stratum_common::bitcoin::util::uint::ParseLengthError; pub type ProxyResult<'a, T> = core::result::Result>; +#[allow(dead_code)] #[derive(Debug)] pub enum ChannelSendError<'a> { SubmitSharesExtended( @@ -28,6 +29,7 @@ pub enum ChannelSendError<'a> { #[derive(Debug)] pub enum Error<'a> { + #[allow(dead_code)] VecToSlice32(Vec), /// Errors on bad CLI argument input. BadCliArgs, diff --git a/roles/jd-client/src/lib/proxy_config.rs b/roles/jd-client/src/lib/proxy_config.rs index 89c97a7beb..af03047d8a 100644 --- a/roles/jd-client/src/lib/proxy_config.rs +++ b/roles/jd-client/src/lib/proxy_config.rs @@ -37,6 +37,7 @@ pub struct ProxyConfig { pub cert_validity_sec: u64, pub tp_address: String, pub tp_authority_public_key: Option, + #[allow(dead_code)] pub retry: u32, pub upstreams: Vec, #[serde(deserialize_with = "duration_from_toml")] diff --git a/roles/jd-client/src/lib/upstream_sv2/mod.rs b/roles/jd-client/src/lib/upstream_sv2/mod.rs index 4209e686ae..70adb2dc9d 100644 --- a/roles/jd-client/src/lib/upstream_sv2/mod.rs +++ b/roles/jd-client/src/lib/upstream_sv2/mod.rs @@ -7,11 +7,3 @@ pub use upstream::Upstream; pub type Message = PoolMessages<'static>; pub type StdFrame = StandardSv2Frame; pub type EitherFrame = StandardEitherFrame; - -#[derive(Clone, Copy, Debug)] -pub struct Sv2MiningConnection { - _version: u16, - _setup_connection_flags: u32, - #[allow(dead_code)] - setup_connection_success_flags: u32, -} diff --git a/roles/jd-client/src/lib/upstream_sv2/upstream.rs b/roles/jd-client/src/lib/upstream_sv2/upstream.rs index b04efa3359..7a4b186787 100644 --- a/roles/jd-client/src/lib/upstream_sv2/upstream.rs +++ b/roles/jd-client/src/lib/upstream_sv2/upstream.rs @@ -110,7 +110,9 @@ pub struct Upstream { tx_status: status::Sender, /// Minimum `extranonce2` size. Initially requested in the `jdc-config.toml`, and ultimately /// set by the SV2 Upstream via the SV2 `OpenExtendedMiningChannelSuccess` message. + #[allow(dead_code)] pub min_extranonce_size: u16, + #[allow(dead_code)] pub upstream_extranonce1_size: usize, /// String be included in coinbase tx input scriptsig pub pool_signature: String, @@ -144,7 +146,7 @@ impl Upstream { /// `UpstreamConnection` with a channel to send and receive messages from the SV2 Upstream /// role and uses channels provided in the function arguments to send and receive messages /// from the `Downstream`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] + #[allow(clippy::too_many_arguments)] pub async fn new( address: SocketAddr, authority_public_key: Secp256k1PublicKey, diff --git a/roles/mining-proxy/src/lib/error.rs b/roles/mining-proxy/src/lib/error.rs index b5c900bfd9..75ded3a67a 100644 --- a/roles/mining-proxy/src/lib/error.rs +++ b/roles/mining-proxy/src/lib/error.rs @@ -9,6 +9,7 @@ pub type EitherFrame = StandardEitherFrame; #[derive(Debug)] #[allow(clippy::large_enum_variant)] #[allow(clippy::enum_variant_names)] +#[allow(dead_code)] pub enum Error { SendError(SendError), UpstreamNotAvailabe(SocketAddr), diff --git a/roles/translator/src/lib/mod.rs b/roles/translator/src/lib/mod.rs index 5a95bcde71..2c5a21c4d0 100644 --- a/roles/translator/src/lib/mod.rs +++ b/roles/translator/src/lib/mod.rs @@ -276,10 +276,6 @@ impl TranslatorSv2 { let _ = task_collector.safe_lock(|t| t.push((task.abort_handle(), "init task".to_string()))); } - - pub fn upstream_address(&self) -> SocketAddr { - self.config.upstream_address.clone().parse().unwrap() - } } fn kill_tasks(task_collector: Arc>>) { diff --git a/roles/translator/src/lib/proxy/bridge.rs b/roles/translator/src/lib/proxy/bridge.rs index 74db21111e..93f4efdeb2 100644 --- a/roles/translator/src/lib/proxy/bridge.rs +++ b/roles/translator/src/lib/proxy/bridge.rs @@ -540,6 +540,7 @@ mod test { pub mod test_utils { use super::*; + #[allow(dead_code)] pub struct BridgeInterface { pub tx_sv1_submit: Sender, pub rx_sv2_submit_shares_ext: Receiver>, diff --git a/roles/translator/src/lib/upstream_sv2/upstream.rs b/roles/translator/src/lib/upstream_sv2/upstream.rs index 6135174328..6e2ddf646c 100644 --- a/roles/translator/src/lib/upstream_sv2/upstream.rs +++ b/roles/translator/src/lib/upstream_sv2/upstream.rs @@ -115,7 +115,7 @@ impl Upstream { /// `UpstreamConnection` with a channel to send and receive messages from the SV2 Upstream /// role and uses channels provided in the function arguments to send and receive messages /// from the `Downstream`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] + #[allow(clippy::too_many_arguments)] pub async fn new( address: SocketAddr, authority_public_key: Secp256k1PublicKey,