Skip to content

Commit 5ee8464

Browse files
committed
fix: merge conflict issue, remove some allow(unused_variables)
1 parent e90b066 commit 5ee8464

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

stacks-signer/src/monitoring/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ pub fn new_rpc_call_timer(_full_path: &str, _origin: &str) -> NoOpTimer {
128128
/// a given block. The block's timestamp is used to calculate the latency.
129129
///
130130
/// Call this right after broadcasting a BlockResponse
131-
#[allow(unused_variables)]
132131
pub fn record_block_response_latency(block: &NakamotoBlock) {
132+
#[cfg(not(feature = "monitoring_prom"))]
133+
let _ = block;
133134
#[cfg(feature = "monitoring_prom")]
134135
{
135136
use clarity::util::get_epoch_time_ms;
@@ -143,8 +144,9 @@ pub fn record_block_response_latency(block: &NakamotoBlock) {
143144
}
144145

145146
/// Record the time taken to validate a block, as reported by the Stacks node.
146-
#[allow(unused_variables)]
147147
pub fn record_block_validation_latency(latency_ms: u64) {
148+
#[cfg(not(feature = "monitoring_prom"))]
149+
let _ = latency_ms;
148150
#[cfg(feature = "monitoring_prom")]
149151
prometheus::SIGNER_BLOCK_VALIDATION_LATENCIES_HISTOGRAM
150152
.with_label_values(&[])
@@ -153,14 +155,13 @@ pub fn record_block_validation_latency(latency_ms: u64) {
153155

154156
/// Start serving monitoring metrics.
155157
/// This will only serve the metrics if the `monitoring_prom` feature is enabled.
156-
#[allow(unused_variables)]
157158
pub fn start_serving_monitoring_metrics(config: GlobalConfig) -> Result<(), String> {
158159
#[cfg(feature = "monitoring_prom")]
159160
{
160161
if config.metrics_endpoint.is_none() {
161162
return Ok(());
162163
}
163-
let thread = std::thread::Builder::new()
164+
let _ = std::thread::Builder::new()
164165
.name("signer_metrics".to_string())
165166
.spawn(move || {
166167
if let Err(monitoring_err) = server::MonitoringServer::start(&config) {

stackslib/src/net/api/postblock_proposal.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,6 @@ pub enum BlockValidateResponse {
170170
Reject(BlockValidateReject),
171171
}
172172

173-
impl BlockValidateResponse {
174-
/// Get the signer signature hash from the block validate response
175-
pub fn signer_signature_hash(&self) -> Sha512Trunc256Sum {
176-
match self {
177-
BlockValidateResponse::Ok(ok) => ok.signer_signature_hash,
178-
BlockValidateResponse::Reject(reject) => reject.signer_signature_hash,
179-
}
180-
}
181-
}
182-
183173
impl From<Result<BlockValidateOk, BlockValidateReject>> for BlockValidateResponse {
184174
fn from(value: Result<BlockValidateOk, BlockValidateReject>) -> Self {
185175
match value {

0 commit comments

Comments
 (0)