pub(crate) fn new(
		import_notifications: ImportNotifications<Block>,
		status_check: Status,
		stream: I,
	) -> Self {
		// how often to check if pending messages that are waiting for blocks to be
		// imported can be checked.
		//
		// the import notifications interval takes care of most of this; this is
		// used in the event of missed import notifications
		const CHECK_PENDING_INTERVAL: Duration = Duration::from_secs(5);
		let now = Instant::now();

		let check_pending = Interval::new(now + CHECK_PENDING_INTERVAL, CHECK_PENDING_INTERVAL);
		UntilImported {
			import_notifications: import_notifications.fuse(),
			status_check,
			inner: stream.fuse(),
			ready: VecDeque::new(),
			check_pending,
			pending: HashMap::new(),
		}
	}
/// Create a new `UntilImported` wrapper.
Create a new `UntilImported` wrapper.
Create a new ` UntilImported ` wrapper .
pub(crate) fn new(
		import_notifications: ImportNotifications<Block>,
		status_check: Status,
		stream: I,
	) -> Self {
		// how often to check if pending messages that are waiting for blocks to be
		// imported can be checked.
		//
		// the import notifications interval takes care of most of this; this is
		// used in the event of missed import notifications
		const CHECK_PENDING_INTERVAL: Duration = Duration::from_secs(5);
		let now = Instant::now();
		let check_pending = Interval::new(now + CHECK_PENDING_INTERVAL, CHECK_PENDING_INTERVAL);
		UntilImported {
			import_notifications: import_notifications.fuse(),
			status_check,
			inner: stream.fuse(),
			ready: VecDeque::new(),
			check_pending,
			pending: HashMap::new(),
		}
	}
pub ( crate ) fn new ( import_notifications : ImportNotifications < Block > , status_check : Status , stream : I , ) -> Self { // how often to check if pending messages that are waiting for blocks to be // imported can be checked. // // the import notifications interval takes care of most of this; this is // used in the event of missed import notifications const CHECK_PENDING_INTERVAL : Duration = Duration :: from_secs ( 5 ) ; let now = Instant :: now ( ) ; let check_pending = Interval :: new ( now + CHECK_PENDING_INTERVAL , CHECK_PENDING_INTERVAL ) ; UntilImported { import_notifications : import_notifications . fuse ( ) , status_check , inner : stream . fuse ( ) , ready : VecDeque :: new ( ) , check_pending , pending : HashMap :: new ( ) , } }
Create a new `UntilImported` wrapper.
Create a new ` UntilImported ` wrapper .
import_notifications
ImportNotifications<Block>
status_check
Status
stream
I
import_notifications
ImportNotifications<Block>
status_check
Status
stream
I