pub enum LogVersion {
Current,
Older,
Ahead,
NotAVersion,
}Expand description
Where a ledger line’s v stands against the version this build
writes. The one authority for “which ledgers open”; every reader that
compares a v asks readable_log_v rather than comparing again.
Exhaustive on purpose: a reader that handles three of these and defaults the fourth is how an unversioned line came to be reported as a broken chain.
Variants§
Current
Exactly what this build writes. Readable, and appendable.
Older
Written by an older build, at or above the first version. Readable: the ledger is append-only and its history stays on disk, so every version from 1 upwards still parses.
Ahead
Written by a newer build. Refused whole rather than read in part: a line this build does not fully understand must not become the prefix of a chain it then extends.
NotAVersion
Below the first version anybody ever wrote, 0 included. No
build produced this, so it is a damaged or foreign line rather
than an old one.