corepc_node/
versions.rs

1// An explicit version of Bitcoin Core must be selected by enabling some feature.
2// We check this here instead of in `lib.rs` because this file is included in `build.rs`.
3#[cfg(all(
4    not(feature = "29_0"),
5    not(feature = "28_2"),
6    not(feature = "28_1"),
7    not(feature = "28_0"),
8    not(feature = "27_2"),
9    not(feature = "27_1"),
10    not(feature = "27_0"),
11    not(feature = "26_2"),
12    not(feature = "25_2"),
13    not(feature = "24_2"),
14    not(feature = "23_2"),
15    not(feature = "22_1"),
16    not(feature = "0_21_2"),
17    not(feature = "0_20_2"),
18    not(feature = "0_19_1"),
19    not(feature = "0_18_1"),
20    not(feature = "0_17_2")
21))]
22compile_error!("enable a feature in order to select the version of Bitcoin Core to use");
23
24#[cfg(feature = "29_0")]
25#[allow(dead_code)] // Triggers in --all-features builds.
26pub const VERSION: &str = "29.0";
27
28#[cfg(all(feature = "28_2", not(feature = "29_0")))]
29pub const VERSION: &str = "28.2";
30
31#[cfg(all(feature = "28_1", not(feature = "28_2")))]
32pub const VERSION: &str = "28.1";
33
34#[cfg(all(feature = "28_0", not(feature = "28_1")))]
35pub const VERSION: &str = "28.0";
36
37#[cfg(all(feature = "27_2", not(feature = "28_0")))]
38pub const VERSION: &str = "27.2";
39
40#[cfg(all(feature = "27_1", not(feature = "27_2")))]
41pub const VERSION: &str = "27.1";
42
43#[cfg(all(feature = "27_0", not(feature = "27_1")))]
44pub const VERSION: &str = "27.0";
45
46#[cfg(all(feature = "26_2", not(feature = "27_0")))]
47pub const VERSION: &str = "26.2";
48
49#[cfg(all(feature = "25_2", not(feature = "26_2")))]
50pub const VERSION: &str = "25.2";
51
52#[cfg(all(feature = "24_2", not(feature = "25_2")))]
53pub const VERSION: &str = "24.2";
54
55#[cfg(all(feature = "23_2", not(feature = "24_2")))]
56pub const VERSION: &str = "23.2";
57
58#[cfg(all(feature = "22_1", not(feature = "23_2")))]
59pub const VERSION: &str = "22.1";
60
61#[cfg(all(feature = "0_21_2", not(feature = "22_1")))]
62pub const VERSION: &str = "0.21.2";
63
64#[cfg(all(feature = "0_20_2", not(feature = "0_21_2")))]
65pub const VERSION: &str = "0.20.2";
66
67#[cfg(all(feature = "0_19_1", not(feature = "0_20_2")))]
68pub const VERSION: &str = "0.19.1";
69
70#[cfg(all(feature = "0_18_1", not(feature = "0_19_1")))]
71pub const VERSION: &str = "0.18.1";
72
73#[cfg(all(feature = "0_17_2", not(feature = "0_18_1")))]
74pub const VERSION: &str = "0.17.2";
75
76/// This is meaningless but we need it otherwise we can't get far enough into
77/// the build process to trigger the `compile_error!` in `./versions.rs`.
78#[cfg(all(
79    not(feature = "29_0"),
80    not(feature = "28_2"),
81    not(feature = "28_1"),
82    not(feature = "28_0"),
83    not(feature = "27_2"),
84    not(feature = "27_1"),
85    not(feature = "27_0"),
86    not(feature = "26_2"),
87    not(feature = "25_2"),
88    not(feature = "24_2"),
89    not(feature = "23_2"),
90    not(feature = "22_1"),
91    not(feature = "0_21_2"),
92    not(feature = "0_20_2"),
93    not(feature = "0_19_1"),
94    not(feature = "0_18_1"),
95    not(feature = "0_17_2")
96))]
97pub const VERSION: &str = "never-used";