fn start_bft<F, C, Block>(
	header: <Block as BlockT>::Header,
	bft_service: Arc<BftService<Block, F, C>>,
) where
	F: consensus::Environment<Block> + 'static,
	C: consensus::BlockImport<Block> + consensus::Authorities<Block> + 'static,
	F::Error: ::std::fmt::Debug,
	<F::Proposer as consensus::Proposer<Block>>::Error: ::std::fmt::Display + Into<error::Error>,
	<F as consensus::Environment<Block>>::Proposer : LocalProposer<Block>,
	<F as consensus::Environment<Block>>::Error: ::std::fmt::Display,
	Block: BlockT,
{
	let mut handle = LocalThreadHandle::current();
	match bft_service.build_upon(&header) {
		Ok(Some(bft_work)) => if let Err(e) = handle.spawn_local(Box::new(bft_work)) {
		    warn!(target: "bft", "Couldn't initialize BFT agreement: {:?}", e);
		}
		Ok(None) => trace!(target: "bft", "Could not start agreement on top of {}", header.hash()),
		Err(e) => warn!(target: "bft", "BFT agreement error: {}", e),
 	}
}
// spin up an instance of BFT agreement on the current thread's executor.
// panics if there is no current thread executor.
spin up an instance of BFT agreement on the current thread's executor.
panics if there is no current thread executor.
spin up an instance of BFT agreement on the current thread ' s executor . panics if there is no current thread executor .
fn start_bft<F, C, Block>(
	header: <Block as BlockT>::Header,
	bft_service: Arc<BftService<Block, F, C>>,
) where
	F: consensus::Environment<Block> + 'static,
	C: consensus::BlockImport<Block> + consensus::Authorities<Block> + 'static,
	F::Error: ::std::fmt::Debug,
	<F::Proposer as consensus::Proposer<Block>>::Error: ::std::fmt::Display + Into<error::Error>,
	<F as consensus::Environment<Block>>::Proposer : LocalProposer<Block>,
	<F as consensus::Environment<Block>>::Error: ::std::fmt::Display,
	Block: BlockT,
{
	let mut handle = LocalThreadHandle::current();
	match bft_service.build_upon(&header) {
		Ok(Some(bft_work)) => if let Err(e) = handle.spawn_local(Box::new(bft_work)) {
		    warn!(target: "bft", "Couldn't initialize BFT agreement: {:?}", e);
		}
		Ok(None) => trace!(target: "bft", "Could not start agreement on top of {}", header.hash()),
		Err(e) => warn!(target: "bft", "BFT agreement error: {}", e),
 	}
}
fn start_bft < F , C , Block > ( header : < Block as BlockT > :: Header , bft_service : Arc < BftService < Block , F , C > > , ) where F : consensus :: Environment < Block > + ' static , C : consensus :: BlockImport < Block > + consensus :: Authorities < Block > + ' static , F :: Error : :: std :: fmt :: Debug , < F :: Proposer as consensus :: Proposer < Block > > :: Error : :: std :: fmt :: Display + Into < error :: Error > , < F as consensus :: Environment < Block > > :: Proposer : LocalProposer < Block > , < F as consensus :: Environment < Block > > :: Error : :: std :: fmt :: Display , Block : BlockT , { let mut handle = LocalThreadHandle :: current ( ) ; match bft_service . build_upon ( & header ) { Ok ( Some ( bft_work ) ) => if let Err ( e ) = handle . spawn_local ( Box :: new ( bft_work ) ) { warn ! ( target " " " " e ) ; } Ok ( None ) => trace ! ( target " " " " header hash ( ) ) , Err ( e ) => warn ! ( target " " " " e ) , } }
spin up an instance of BFT agreement on the current thread's executor.
spin up an instance of BFT agreement on the current thread ' s executor .
header
<Block as BlockT>::Header
bft_service
Arc<BftService<Block, F, C>>
header
<Block as BlockT>::Header
bft_service
Arc<BftService<Block, F, C>>