Skip to main content

RoundOrder

Trait RoundOrder 

Source
pub trait RoundOrder { }
Expand description

Definition (Round order). Rounds are Round values, totally ordered by the derived Ord on the enum, which orders first by variant and then by the contained u32:

Round::Fast  <  Round::MultiLeader(0) < Round::MultiLeader(1) < …
             <  Round::SingleLeader(0) < Round::SingleLeader(1) < …
             <  Round::Validator(0)  < Round::Validator(1)  < …

In particular Round::Fast is the global minimum, which several arguments use directly: a guard of the form x.round() < Round::Fast is unsatisfiable.

The successor function is ChainOwnership::next_round, which is not the successor of this order — it skips the multi-leader rounds a chain is not configured for and saturates into Round::Validator. It is monotone, which is all the round-advancement results need.

Implementors§