Skip to content

Commit

Permalink
fix(miner): clippy error (#4793)
Browse files Browse the repository at this point in the history
Description
---
Removes unused function in miner

Motivation and Context
---
Clippy

How Has This Been Tested?
---
No clippy error
  • Loading branch information
sdbondi committed Oct 11, 2022
1 parent 4811a57 commit 734db22
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions applications/tari_miner/src/difficulty.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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};
Expand Down

0 comments on commit 734db22

Please sign in to comment.