pub(crate) fn rebroadcasting_network<B: BlockT, N: Network<B>>(network: N) -> (BroadcastWorker<B, N>, BroadcastHandle<B, N>) {
	use std::time::Duration;
	const REBROADCAST_PERIOD: Duration = Duration::from_secs(60);

	let (tx, rx) = mpsc::unbounded();

	(
		BroadcastWorker {
			interval: Interval::new_interval(REBROADCAST_PERIOD),
			set_id: SetId(0), // will be overwritten on first item to broadcast.
			last_commit: None,
			round_messages: (Round(0), Vec::new()),
			announcements: HashMap::new(),
			network: network.clone(),
			incoming_broadcast: rx,
		},
		BroadcastHandle {
			relay: tx,
			network,
		},
	)
}
/// Produces a future that should be run in the background and proxies
/// and rebroadcasts messages.
Produces a future that should be run in the background and proxies
and rebroadcasts messages.
Produces a future that should be run in the background and proxies and rebroadcasts messages .
pub(crate) fn rebroadcasting_network<B: BlockT, N: Network<B>>(network: N) -> (BroadcastWorker<B, N>, BroadcastHandle<B, N>) {
	use std::time::Duration;
	const REBROADCAST_PERIOD: Duration = Duration::from_secs(60);
	let (tx, rx) = mpsc::unbounded();
	(
		BroadcastWorker {
			interval: Interval::new_interval(REBROADCAST_PERIOD),
			set_id: SetId(0), // will be overwritten on first item to broadcast.
			last_commit: None,
			round_messages: (Round(0), Vec::new()),
			announcements: HashMap::new(),
			network: network.clone(),
			incoming_broadcast: rx,
		},
		BroadcastHandle {
			relay: tx,
			network,
		},
	)
}
pub ( crate ) fn rebroadcasting_network < B : BlockT , N : Network < B > > ( network : N ) -> ( BroadcastWorker < B , N > , BroadcastHandle < B , N > ) { use std :: time :: Duration ; const REBROADCAST_PERIOD : Duration = Duration :: from_secs ( 60 ) ; let ( tx , rx ) = mpsc :: unbounded ( ) ; ( BroadcastWorker { interval : Interval :: new_interval ( REBROADCAST_PERIOD ) , set_id : SetId ( 0 ) , // will be overwritten on first item to broadcast. last_commit : None , round_messages : ( Round ( 0 ) , Vec :: new ( ) ) , announcements : HashMap :: new ( ) , network : network . clone ( ) , incoming_broadcast : rx , } , BroadcastHandle { relay : tx , network , } , ) }
Produces a future that should be run in the background and proxies
and rebroadcasts messages.
Produces a future that should be run in the background and proxies and rebroadcasts messages .
network
N
network
N