pub fn achieved_difficulty(header: &BlockHeader) -> Result<Difficulty, PowError> {
        match header.pow.pow_algo {
            PowAlgorithm::Monero => Ok(monero_difficulty(header)?),
            PowAlgorithm::Blake => Ok(blake_difficulty(header)),
            PowAlgorithm::Sha3 => Ok(sha3_difficulty(header)),
        }
    }
/// This function  will calculate the achieved difficulty for the proof of work
/// given the block header.
/// This function is used to validate proofs of work generated by miners.
///
/// Generally speaking, the difficulty is roughly how many mining attempts a miner will make, _on average_ before
/// finding a nonce that meets the difficulty target.
///
/// In actuality, the difficulty is _defined_ as the maximum target value (u265) divided by the block header hash
/// (as a u256)
///
/// If there are any problems with calculating a difficulty (e.g. an invalid header), then the function returns a
/// difficulty of one.
This function  will calculate the achieved difficulty for the proof of work
given the block header.
This function is used to validate proofs of work generated by miners.

Generally speaking, the difficulty is roughly how many mining attempts a miner will make, _on average_ before
finding a nonce that meets the difficulty target.

In actuality, the difficulty is _defined_ as the maximum target value (u265) divided by the block header hash
(as a u256)

If there are any problems with calculating a difficulty , then the function returns a
difficulty of one.
This function will calculate the achieved difficulty for the proof of work given the block header . This function is used to validate proofs of work generated by miners . Generally speaking the difficulty is roughly how many mining attempts a miner will make _on average_ before finding a nonce that meets the difficulty target . In actuality the difficulty is _defined_ as the maximum target value ( u265 ) divided by the block header hash ( as a u256 ) If there are any problems with calculating a difficulty then the function returns a difficulty of one .
pub fn achieved_difficulty(header: &BlockHeader) -> Result<Difficulty, PowError> {
        match header.pow.pow_algo {
            PowAlgorithm::Monero => Ok(monero_difficulty(header)?),
            PowAlgorithm::Blake => Ok(blake_difficulty(header)),
            PowAlgorithm::Sha3 => Ok(sha3_difficulty(header)),
        }
    }
pub fn achieved_difficulty ( header : & BlockHeader ) -> Result < Difficulty , PowError > { match header . pow . pow_algo { PowAlgorithm :: Monero => Ok ( monero_difficulty ( header ) ? ) , PowAlgorithm :: Blake => Ok ( blake_difficulty ( header ) ) , PowAlgorithm :: Sha3 => Ok ( sha3_difficulty ( header ) ) , } }
This function  will calculate the achieved difficulty for the proof of work
given the block header.
This function will calculate the achieved difficulty for the proof of work given the block header .
header
&BlockHeader
header
&BlockHeader