pub async fn find_parent_for_building<Block: BlockT>(
relay_client: &impl RelayChainInterface,
backend: &impl Backend<Block>,
para_id: ParaId,
params: ParentSearchParams,
) -> RelayChainResult<Option<ParentSearchResult<Block>>>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).