Skip to main content

splinter_shard_election

Function splinter_shard_election 

Source
pub unsafe extern "C" fn splinter_shard_election(
    out_intent: *mut u8,
) -> u32
Expand description

@brief Run the read-only election scan and return the current sovereign.

Highest-priority UNEXPIRED bid wins; ties broken by earliest claimed_at, then lowest pid. DONTNEED soft bumper: a DONTNEED bid is skipped as a winner while any unexpired WILLNEED or SEQUENTIAL bid exists.

@param out_intent Optional; receives the winning bid’s intent (or SPL_INTENT_NONE). @return the winning shard_id, or 0 if there is no current sovereign.