pub async fn find_parent_for_building<B: BlockT>(
params: ParentSearchParams,
backend: &impl Backend<B>,
relay_client: &impl RelayChainInterface,
) -> Result<Option<ParentSearchResult<B>>, RelayChainError>Expand description
Find the best parent block to build on.
This accepts a relay-chain block to be used as an anchor and searches for the best parachain block to use as a parent for a new block.
The search starts from either the pending block (if one exists) or the included block, and finds the deepest descendant whose relay-parent is within the allowed ancestry.
Returns None if no suitable parent can be found (e.g., included block unknown locally).