fn read_cht_root(
		&self,
		cht_type: u8,
		cht_size: u64,
		block: NumberFor<Block>
	) -> ClientResult<Block::Hash> {
		let no_cht_for_block = || ClientErrorKind::Backend(format!("CHT for block {} not exists", block)).into();

		let cht_number = cht::block_to_cht_number(cht_size, block).ok_or_else(no_cht_for_block)?;
		let cht_start = cht::start_number(cht_size, cht_number);
		self.db.get(columns::CHT, &cht_key(cht_type, cht_start)).map_err(db_err)?
			.ok_or_else(no_cht_for_block)
			.and_then(|hash| Block::Hash::decode(&mut &*hash).ok_or_else(no_cht_for_block))
	}
/// Read CHT root of given type for the block.
Read CHT root of given type for the block.
Read CHT root of given type for the block .
fn read_cht_root(
		&self,
		cht_type: u8,
		cht_size: u64,
		block: NumberFor<Block>
	) -> ClientResult<Block::Hash> {
		let no_cht_for_block = || ClientErrorKind::Backend(format!("CHT for block {} not exists", block)).into();
		let cht_number = cht::block_to_cht_number(cht_size, block).ok_or_else(no_cht_for_block)?;
		let cht_start = cht::start_number(cht_size, cht_number);
		self.db.get(columns::CHT, &cht_key(cht_type, cht_start)).map_err(db_err)?
			.ok_or_else(no_cht_for_block)
			.and_then(|hash| Block::Hash::decode(&mut &*hash).ok_or_else(no_cht_for_block))
	}
fn read_cht_root ( & self , cht_type : u8 , cht_size : u64 , block : NumberFor < Block > ) -> ClientResult < Block :: Hash > { let no_cht_for_block = | | ClientErrorKind :: Backend ( format ! ( " " block ) ) . into ( ) ; let cht_number = cht :: block_to_cht_number ( cht_size , block ) . ok_or_else ( no_cht_for_block ) ? ; let cht_start = cht :: start_number ( cht_size , cht_number ) ; self . db . get ( columns :: CHT , & cht_key ( cht_type , cht_start ) ) . map_err ( db_err ) ? . ok_or_else ( no_cht_for_block ) . and_then ( | hash | Block :: Hash :: decode ( & mut & * hash ) . ok_or_else ( no_cht_for_block ) ) }
Read CHT root of given type for the block.
Read CHT root of given type for the block .
&self
cht_type
u8
cht_size
u64
block
NumberFor<Block>
&self
cht_type
u8
cht_size
u64
block
NumberFor<Block>