pub(crate) fn add_pending_change<F, E>(
		&mut self,
		pending: PendingChange<H, N>,
		is_descendent_of: &F,
	) -> Result<(), fork_tree::Error<E>> where
		F: Fn(&H, &H) -> Result<bool, E>,
		E:  std::error::Error,
	{
		match pending.delay_kind {
			DelayKind::Best { .. } => {
				self.add_forced_change(pending, is_descendent_of)
			},
			DelayKind::Finalized => {
				self.add_standard_change(pending, is_descendent_of)
			},
		}
	}
/// Note an upcoming pending transition. Multiple pending standard changes
/// on the same branch can be added as long as they don't overlap. Forced
/// changes are restricted to one per fork. This method assumes that changes
/// on the same branch will be added in-order. The given function
/// `is_descendent_of` should return `true` if the second hash (target) is a
/// descendent of the first hash (base).
Note an upcoming pending transition. Multiple pending standard changes
on the same branch can be added as long as they don't overlap. Forced
changes are restricted to one per fork. This method assumes that changes
on the same branch will be added in-order. The given function
`is_descendent_of` should return `true` if the second hash (target) is a
descendent of the first hash (base).
Note an upcoming pending transition . Multiple pending standard changes on the same branch can be added as long as they don ' t overlap . Forced changes are restricted to one per fork . This method assumes that changes on the same branch will be added in - order . The given function ` is_descendent_of ` should return ` true ` if the second hash ( target ) is a descendent of the first hash ( base ) .
pub(crate) fn add_pending_change<F, E>(
		&mut self,
		pending: PendingChange<H, N>,
		is_descendent_of: &F,
	) -> Result<(), fork_tree::Error<E>> where
		F: Fn(&H, &H) -> Result<bool, E>,
		E:  std::error::Error,
	{
		match pending.delay_kind {
			DelayKind::Best { .. } => {
				self.add_forced_change(pending, is_descendent_of)
			},
			DelayKind::Finalized => {
				self.add_standard_change(pending, is_descendent_of)
			},
		}
	}
pub ( crate ) fn add_pending_change < F , E > ( & mut self , pending : PendingChange < H , N > , is_descendent_of : & F , ) -> Result < ( ) , fork_tree :: Error < E > > where F : Fn ( & H , & H ) -> Result < bool , E > , E : std :: error :: Error , { match pending . delay_kind { DelayKind :: Best { .. } => { self . add_forced_change ( pending , is_descendent_of ) } , DelayKind :: Finalized => { self . add_standard_change ( pending , is_descendent_of ) } , } }
Note an upcoming pending transition.
Note an upcoming pending transition .
&mut self
pending
PendingChange<H, N>
is_descendent_of
&F
&mut self
pending
PendingChange<H, N>
is_descendent_of
&F