@@ -353,6 +353,7 @@ pub fn new_full_base(
353353 & sc_consensus_babe:: BabeBlockImport < Block , FullClient , FullGrandpaBlockImport > ,
354354 & sc_consensus_babe:: BabeLink < Block > ,
355355 ) ,
356+ gossip_duration_millis : Option < u64 > ,
356357) -> Result < NewFullBase , ServiceError > {
357358 let hwbench = if !disable_hardware_benchmarks {
358359 config. database . path ( ) . map ( |database_path| {
@@ -547,7 +548,7 @@ pub fn new_full_base(
547548
548549 let grandpa_config = grandpa:: Config {
549550 // FIXME #1578 make this available through chainspec
550- gossip_duration : std:: time:: Duration :: from_millis ( 333 ) ,
551+ gossip_duration : std:: time:: Duration :: from_millis ( gossip_duration_millis . unwrap_or ( 333 ) ) ,
551552 justification_generation_period : 1 , // https://github.com/paritytech/substrate/pull/14423#issuecomment-1633837906
552553 name : Some ( name) ,
553554 observer_enabled : false ,
@@ -624,9 +625,15 @@ pub fn new_full_base(
624625pub fn new_full (
625626 config : Configuration ,
626627 disable_hardware_benchmarks : bool ,
628+ gossip_duration_millis : Option < u64 > ,
627629) -> Result < TaskManager , ServiceError > {
628- new_full_base ( config, disable_hardware_benchmarks, |_, _| ( ) )
629- . map ( |NewFullBase { task_manager, .. } | task_manager)
630+ new_full_base (
631+ config,
632+ disable_hardware_benchmarks,
633+ |_, _| ( ) ,
634+ gossip_duration_millis,
635+ )
636+ . map ( |NewFullBase { task_manager, .. } | task_manager)
630637}
631638
632639#[ cfg( test) ]
@@ -705,6 +712,7 @@ mod tests {
705712 babe_link : & sc_consensus_babe:: BabeLink < Block > | {
706713 setup_handles = Some ( ( block_import. clone ( ) , babe_link. clone ( ) ) ) ;
707714 } ,
715+ None ,
708716 ) ?;
709717
710718 let node = sc_service_test:: TestNetComponents :: new (
@@ -900,7 +908,7 @@ mod tests {
900908 sync,
901909 transaction_pool,
902910 ..
903- } = new_full_base ( config, false , |_, _| ( ) ) ?;
911+ } = new_full_base ( config, false , |_, _| ( ) , None ) ?;
904912 Ok ( sc_service_test:: TestNetComponents :: new (
905913 task_manager,
906914 client,
0 commit comments