pub fn push(&mut self, xt: <Block as BlockT>::Extrinsic) -> error::Result<()> {
		use crate::runtime_api::ApiExt;

		let block_id = &self.block_id;
		let extrinsics = &mut self.extrinsics;

		self.api.map_api_result(|api| {
			match api.apply_extrinsic_with_context(block_id, ExecutionContext::BlockConstruction, xt.clone())? {
				Ok(ApplyOutcome::Success) | Ok(ApplyOutcome::Fail) => {
					extrinsics.push(xt);
					Ok(())
				}
				Err(e) => {
					Err(error::ErrorKind::ApplyExtrinsicFailed(e).into())
				}
			}
		})
	}
/// Push onto the block's list of extrinsics.
///
/// This will ensure the extrinsic can be validly executed (by executing it);
Push onto the block's list of extrinsics.
This will ensure the extrinsic can be validly executed (by executing it).
Push onto the block ' s list of extrinsics . This will ensure the extrinsic can be validly executed ( by executing it ) .
pub fn push(&mut self, xt: <Block as BlockT>::Extrinsic) -> error::Result<()> {
		use crate::runtime_api::ApiExt;
		let block_id = &self.block_id;
		let extrinsics = &mut self.extrinsics;
		self.api.map_api_result(|api| {
			match api.apply_extrinsic_with_context(block_id, ExecutionContext::BlockConstruction, xt.clone())? {
				Ok(ApplyOutcome::Success) | Ok(ApplyOutcome::Fail) => {
					extrinsics.push(xt);
					Ok(())
				}
				Err(e) => {
					Err(error::ErrorKind::ApplyExtrinsicFailed(e).into())
				}
			}
		})
	}
pub fn push ( & mut self , xt : < Block as BlockT > :: Extrinsic ) -> error :: Result < ( ) > { use crate :: runtime_api :: ApiExt ; let block_id = & self . block_id ; let extrinsics = & mut self . extrinsics ; self . api . map_api_result ( | api | { match api . apply_extrinsic_with_context ( block_id , ExecutionContext :: BlockConstruction , xt . clone ( ) ) ? { Ok ( ApplyOutcome :: Success ) | Ok ( ApplyOutcome :: Fail ) => { extrinsics . push ( xt ) ; Ok ( ( ) ) } Err ( e ) => { Err ( error :: ErrorKind :: ApplyExtrinsicFailed ( e ) . into ( ) ) } } } ) }
Push onto the block's list of extrinsics.
Push onto the block ' s list of extrinsics .
&mut self
xt
<Block as BlockT>::Extrinsic
&mut self
xt
<Block as BlockT>::Extrinsic