pub fn new(checker: Arc<FetchChecker<B>>) -> Self {
		OnDemand {
			checker,
			network_sender: Mutex::new(None),
			core: Mutex::new(OnDemandCore {
				next_request_id: 0,
				pending_requests: VecDeque::new(),
				active_peers: LinkedHashMap::new(),
				idle_peers: VecDeque::new(),
				best_blocks: HashMap::new(),
			})
		}
	}
/// Creates new on-demand service.
Creates new on-demand service.
Creates new on - demand service .
pub fn new(checker: Arc<FetchChecker<B>>) -> Self {
		OnDemand {
			checker,
			network_sender: Mutex::new(None),
			core: Mutex::new(OnDemandCore {
				next_request_id: 0,
				pending_requests: VecDeque::new(),
				active_peers: LinkedHashMap::new(),
				idle_peers: VecDeque::new(),
				best_blocks: HashMap::new(),
			})
		}
	}
pub fn new ( checker : Arc < FetchChecker < B > > ) -> Self { OnDemand { checker , network_sender : Mutex :: new ( None ) , core : Mutex :: new ( OnDemandCore { next_request_id : 0 , pending_requests : VecDeque :: new ( ) , active_peers : LinkedHashMap :: new ( ) , idle_peers : VecDeque :: new ( ) , best_blocks : HashMap :: new ( ) , } ) } }
Creates new on-demand service.
Creates new on - demand service .
checker
Arc<FetchChecker<B>>
checker
Arc<FetchChecker<B>>