Skip to main content

generation_is_newer

Function generation_is_newer 

Source
fn generation_is_newer(a: u8, b: u8) -> bool
Expand description

RFC-1982 serial-number comparison over a u8 generation: is a strictly newer than b?

SURB generations are minted monotonically by the creator and only ever compared across the two adjacent generations that can be in flight at once, so a u8 serial (window 128) is ample and wraps cleanly: 255 → 0 reads as newer.