pub fn select_randomized_leader<SignatureKey, Entry: StakeTableEntryType<SignatureKey> + Clone>(
randomized_committee: &RandomizedCommittee<Entry>,
view: u64,
) -> Entry
Expand description
select the leader for a view
ยงPanics
Panics if cdf
is empty. Results in undefined behaviour if cdf
is not ordered.
Note that we try to downcast a U512 to a U256, but this should never panic because the U512 should be strictly smaller than U256::MAX by construction.