From 734db22bbdd36b5371aa9c70f4342bb0d3c2f3a4 Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Tue, 11 Oct 2022 13:15:16 +0200 Subject: [PATCH] fix(miner): clippy error (#4793) Description --- Removes unused function in miner Motivation and Context --- Clippy How Has This Been Tested? --- No clippy error --- applications/tari_miner/src/difficulty.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/applications/tari_miner/src/difficulty.rs b/applications/tari_miner/src/difficulty.rs index 3d1d354861..8e283d8348 100644 --- a/applications/tari_miner/src/difficulty.rs +++ b/applications/tari_miner/src/difficulty.rs @@ -23,7 +23,7 @@ use std::convert::TryInto; use tari_app_grpc::tari_rpc::BlockHeader as grpc_header; -use tari_core::{blocks::BlockHeader, large_ints::U256, proof_of_work::sha3_difficulty}; +use tari_core::{blocks::BlockHeader, proof_of_work::sha3_difficulty}; use tari_utilities::epoch_time::EpochTime; use crate::errors::MinerError; @@ -81,13 +81,6 @@ impl BlockHeaderSha3 { } } -/// This will provide the difficulty of the hash assuming the hash is big_endian -fn big_endian_difficulty(hash: &[u8]) -> Difficulty { - let scalar = U256::from_big_endian(hash); // Big endian so the hash has leading zeroes - let result = U256::MAX / scalar; - result.low_u64() -} - #[cfg(test)] pub mod test { use chrono::{DateTime, NaiveDate, Utc};