pub fn check_achieved_and_target_difficulty(&self, block_header: &BlockHeader) -> Result<(), ValidationError> {
        // We cant use the actual tip, as this is used by the header sync, the tip has not yet been downloaded, but we
        // can assume that the previous header was added, so we use that as the tip.
        let tip_height = block_header.height.saturating_sub(1);
        let db = self.db.db_read_access()?;
        check_achieved_and_target_difficulty(&*db, block_header, tip_height, self.rules.clone())
    }
/// Calculates the achieved and target difficulties at the specified height and compares them.
Calculates the achieved and target difficulties at the specified height and compares them.
Calculates the achieved and target difficulties at the specified height and compares them .
pub fn check_achieved_and_target_difficulty(&self, block_header: &BlockHeader) -> Result<(), ValidationError> {
        // We cant use the actual tip, as this is used by the header sync, the tip has not yet been downloaded, but we
        // can assume that the previous header was added, so we use that as the tip.
        let tip_height = block_header.height.saturating_sub(1);
        let db = self.db.db_read_access()?;
        check_achieved_and_target_difficulty(&*db, block_header, tip_height, self.rules.clone())
    }
pub fn check_achieved_and_target_difficulty ( & self , block_header : & BlockHeader ) -> Result < ( ) , ValidationError > { // We cant use the actual tip, as this is used by the header sync, the tip has not yet been downloaded, but we // can assume that the previous header was added, so we use that as the tip. let tip_height = block_header . height . saturating_sub ( 1 ) ; let db = self . db . db_read_access ( ) ? ; check_achieved_and_target_difficulty ( & * db , block_header , tip_height , self . rules . clone ( ) ) }
Calculates the achieved and target difficulties at the specified height and compares them.
Calculates the achieved and target difficulties at the specified height and compares them .
&self
block_header
&BlockHeader
&self
block_header
&BlockHeader