/// This function tests that the block timestamp is greater than the median timestamp at the specified height.
This function tests that the block timestamp is greater than the median timestamp at the specified height.
This function tests that the block timestamp is greater than the median timestamp at the specified height .
pub fn check_median_timestamp(&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_median_timestamp(&*db, block_header, tip_height, self.rules.clone())
    }
pub fn check_median_timestamp ( & 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_median_timestamp ( & * db , block_header , tip_height , self . rules . clone ( ) ) }
This function tests that the block timestamp is greater than the median timestamp at the specified height.
This function tests that the block timestamp is greater than the median timestamp at the specified height .
&self
block_header
&BlockHeader