@@ -536,7 +536,7 @@ fn register_finality_tracker_inherent_data_provider<Block: BlockT, Client>(
536536}
537537
538538/// Parameters used to run Grandpa.
539- pub struct GrandpaParams < Block : BlockT , C , N , SC , VR , X > {
539+ pub struct GrandpaParams < Block : BlockT , C , N , SC , VR > {
540540 /// Configuration for the GRANDPA service.
541541 pub config : Config ,
542542 /// A link to the block import worker.
@@ -545,8 +545,6 @@ pub struct GrandpaParams<Block: BlockT, C, N, SC, VR, X> {
545545 pub network : N ,
546546 /// The inherent data providers.
547547 pub inherent_data_providers : InherentDataProviders ,
548- /// Handle to a future that will resolve on exit.
549- pub on_exit : X ,
550548 /// If supplied, can be used to hook on telemetry connection established events.
551549 pub telemetry_on_connect : Option < futures:: channel:: mpsc:: UnboundedReceiver < ( ) > > ,
552550 /// A voting rule used to potentially restrict target votes.
@@ -557,8 +555,8 @@ pub struct GrandpaParams<Block: BlockT, C, N, SC, VR, X> {
557555
558556/// Run a GRANDPA voter as a task. Provide configuration and a link to a
559557/// block import worker that has already been instantiated with `block_import`.
560- pub fn run_grandpa_voter < Block : BlockT , BE : ' static , C , N , SC , VR , X > (
561- grandpa_params : GrandpaParams < Block , C , N , SC , VR , X > ,
558+ pub fn run_grandpa_voter < Block : BlockT , BE : ' static , C , N , SC , VR > (
559+ grandpa_params : GrandpaParams < Block , C , N , SC , VR > ,
562560) -> sp_blockchain:: Result < impl Future < Output = ( ) > + Unpin + Send + ' static > where
563561 Block :: Hash : Ord ,
564562 BE : Backend < Block > + ' static ,
@@ -567,15 +565,13 @@ pub fn run_grandpa_voter<Block: BlockT, BE: 'static, C, N, SC, VR, X>(
567565 VR : VotingRule < Block , C > + Clone + ' static ,
568566 NumberFor < Block > : BlockNumberOps ,
569567 DigestFor < Block > : Encode ,
570- X : futures:: Future < Output =( ) > + Clone + Send + Unpin + ' static ,
571568 C : ClientForGrandpa < Block , BE > + ' static ,
572569{
573570 let GrandpaParams {
574571 mut config,
575572 link,
576573 network,
577574 inherent_data_providers,
578- on_exit,
579575 telemetry_on_connect,
580576 voting_rule,
581577 prometheus_registry,
@@ -647,7 +643,7 @@ pub fn run_grandpa_voter<Block: BlockT, BE: 'static, C, N, SC, VR, X>(
647643 let telemetry_task = telemetry_task
648644 . then ( |_| future:: pending :: < ( ) > ( ) ) ;
649645
650- Ok ( future:: select ( future :: select ( voter_work, on_exit ) , telemetry_task) . map ( drop) )
646+ Ok ( future:: select ( voter_work, telemetry_task) . map ( drop) )
651647}
652648
653649/// Future that powers the voter.
0 commit comments