Skip to main content

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