pub fn read_header<Block: BlockT>(
	db: &KeyValueDB,
	col_index: Option<u32>,
	col: Option<u32>,
	id: BlockId<Block>,
) -> client::error::Result<Option<Block::Header>> {
	match read_db(db, col_index, col, id)? {
		Some(header) => match Block::Header::decode(&mut &header[..]) {
			Some(header) => Ok(Some(header)),
			None => return Err(
				client::error::ErrorKind::Backend("Error decoding header".into()).into()
			),
		}
		None => Ok(None),
	}
}
/// Read a header from the database.
Read a header from the database.
Read a header from the database .
pub fn read_header<Block: BlockT>(
	db: &KeyValueDB,
	col_index: Option<u32>,
	col: Option<u32>,
	id: BlockId<Block>,
) -> client::error::Result<Option<Block::Header>> {
	match read_db(db, col_index, col, id)? {
		Some(header) => match Block::Header::decode(&mut &header[..]) {
			Some(header) => Ok(Some(header)),
			None => return Err(
				client::error::ErrorKind::Backend("Error decoding header".into()).into()
			),
		}
		None => Ok(None),
	}
}
pub fn read_header < Block : BlockT > ( db : & KeyValueDB , col_index : Option < u32 > , col : Option < u32 > , id : BlockId < Block > , ) -> client :: error :: Result < Option < Block :: Header > > { match read_db ( db , col_index , col , id ) ? { Some ( header ) => match Block :: Header :: decode ( & mut & header [ .. ] ) { Some ( header ) => Ok ( Some ( header ) ) , None => return Err ( client :: error :: ErrorKind :: Backend ( " " . into ( ) ) . into ( ) ) , } None => Ok ( None ) , } }
Read a header from the database.
Read a header from the database .
db
&KeyValueDB
col_index
Option<u32>
col
Option<u32>
id
BlockId<Block>
db
&KeyValueDB
col_index
Option<u32>
col
Option<u32>
id
BlockId<Block>