1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Reader versions: how new a build must be to interpret the wallet's ledger state.
use crateSqliteClientError;
/// The highest `tpir_meta.min_reader_version` this build can interpret. A wallet requiring a
/// newer reader is refused rather than operated on with semantics this build lacks: every
/// ledger read and write fails, and so does a rewind, which would otherwise leave state this
/// build cannot maintain anchored on replaced blocks.
///
/// Version 3 maintains candidate recovery state through rewinds, policy transitions, and
/// account changes; the first candidate commit requires it. Version 5 honors activation,
/// qualification, recovery suspension, and retained outputs whose receive was withdrawn. Version 4
/// could admit those retained rows under public authority, so activation writes require 5.
/// Version 6 separates observed revisions from trusted replacement; revision writes require 6.
/// Version 7 maintains source-bound transaction facts through withdrawals and rewinds.
/// Version 8 retains shared derivation origins after address materialization.
///
/// This is the newest version below, under the name readers check against.
pub const TPIR_READER_VERSION: i64 = SHARED_DERIVATION_READER_VERSION;
/// The reader version retained shared derivation origins require.
pub const SHARED_DERIVATION_READER_VERSION: i64 = 8;
/// Maintains source-bound transaction facts through withdrawals and rewinds.
pub const METADATA_READER_VERSION: i64 = 7;
/// Separates observed revision identities from trusted wallet-wide supersession.
pub const REVISION_READER_VERSION: i64 = 6;
/// The reader version candidate recovery state requires.
pub const RECOVERY_READER_VERSION: i64 = 3;
/// The reader version activation, qualification, and recovery suspension state requires.
pub const ACTIVATION_READER_VERSION: i64 = 5;
/// Raises `tpir_meta.min_reader_version` to at least `version`, so that builds that cannot
/// interpret the state about to be written fail closed rather than ignore it.
pub