pub fn at_block(block_id: &BlockId<Block>, api: &'a A) -> error::Result<Self> {
		let number = api.block_number_from_id(block_id)?
			.ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?
			+ One::one();

		let parent_hash = api.block_hash_from_id(block_id)?
			.ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?;
		let header = <<Block as BlockT>::Header as HeaderT>::new(
			number,
			Default::default(),
			Default::default(),
			parent_hash,
			Default::default()
		);
		let api = api.runtime_api();
		api.initialize_block_with_context(block_id, ExecutionContext::BlockConstruction, &header)?;
		Ok(BlockBuilder {
			header,
			extrinsics: Vec::new(),
			api,
			block_id: *block_id,
		})
	}
/// Create a new instance of builder from the given client using a particular block's ID to
/// build upon.
Create a new instance of builder from the given client using a particular block's ID to
build upon.
Create a new instance of builder from the given client using a particular block ' s ID to build upon .
pub fn at_block(block_id: &BlockId<Block>, api: &'a A) -> error::Result<Self> {
		let number = api.block_number_from_id(block_id)?
			.ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?
			+ One::one();
		let parent_hash = api.block_hash_from_id(block_id)?
			.ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?;
		let header = <<Block as BlockT>::Header as HeaderT>::new(
			number,
			Default::default(),
			Default::default(),
			parent_hash,
			Default::default()
		);
		let api = api.runtime_api();
		api.initialize_block_with_context(block_id, ExecutionContext::BlockConstruction, &header)?;
		Ok(BlockBuilder {
			header,
			extrinsics: Vec::new(),
			api,
			block_id: *block_id,
		})
	}
pub fn at_block ( block_id : & BlockId < Block > , api : & ' a A ) -> error :: Result < Self > { let number = api . block_number_from_id ( block_id ) ? . ok_or_else ( | | error :: ErrorKind :: UnknownBlock ( format ! ( " " block_id ) ) ) ? + One :: one ( ) ; let parent_hash = api . block_hash_from_id ( block_id ) ? . ok_or_else ( | | error :: ErrorKind :: UnknownBlock ( format ! ( " " block_id ) ) ) ? ; let header = < < Block as BlockT > :: Header as HeaderT > :: new ( number , Default :: default ( ) , Default :: default ( ) , parent_hash , Default :: default ( ) ) ; let api = api . runtime_api ( ) ; api . initialize_block_with_context ( block_id , ExecutionContext :: BlockConstruction , & header ) ? ; Ok ( BlockBuilder { header , extrinsics : Vec :: new ( ) , api , block_id : * block_id , } ) }
Create a new instance of builder from the given client using a particular block's ID to
build upon.
Create a new instance of builder from the given client using a particular block ' s ID to build upon .
block_id
&BlockId<Block>
api
&'a A
block_id
&BlockId<Block>
api
&'a A