Skip to main content

select_chain_tip

Function select_chain_tip 

Source
pub fn select_chain_tip(candidates: &[(i64, u64, bool)]) -> Option<usize>
Expand description

Selects the eligible chain receipt with the greatest (offset, sequence) rank, preserving the first receipt when ranks tie.

The host keeps opaque chain heads and decoded metadata outside Creusot. It supplies only each receipt’s ordering keys and whether that receipt is eligible to continue the chain.