1# @ajax/mesh-jobs-lid
23The job table's leadership ids. A lid is the fleet term in its high 24 bits and a count below it.
4`mj_lid_next` picks one above every leadership a member has persisted, so a later leadership's lid
5is always larger, even within one term (a restarted coordinator, a leader that leads again), and
6never comes from a clock (review finding 10). `mj_lease_base` is the first lease id of a leadership,
7so two leaderships' leases never share an id. Header-only and freestanding.
89## Ported from
1011[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
12`crates/mesh-host/src/jobs.rs`: `lid_term`, `lid_next`, `lease_base`.
1314## Tests
1516`tests/lid.c`: the checks in the Rust's `a_restarted_coordinator_with_its_clock_behind`, and the
1724-bit term limit.
1819## Licence
2021MIT. See the repository's LICENSE.