Skip to content

Commit c60f18c

Browse files
committed
Add feature "22_0" for bitcoin 22.0
1 parent 83cf6c8 commit c60f18c

File tree

5 files changed

+44
-3
lines changed

5 files changed

+44
-3
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: [ ubuntu-20.04 ]
16-
feature: [ "0_21_1", "0_21_0", "0_20_1", "0_20_0", "0_19_1", "0_19_0_1", "0_18_1", "0_18_0", "0_17_1"]
16+
feature: [ "22_0", "0_21_1", "0_21_0", "0_20_1", "0_20_0", "0_19_1", "0_19_0_1", "0_18_1", "0_18_0", "0_17_1"]
1717
include:
1818
- os: "macos-10.15"
1919
feature: "0_21_1"

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation = "https://docs.rs/bitcoind/"
99
edition = "2018"
1010

1111
[dependencies]
12-
core-rpc = "0.14"
12+
core-rpc = "0.15"
1313
tempfile = "3.1"
1414
log = "0.4"
1515
home = "0.5.3" # use same ver in build-dep
@@ -24,6 +24,7 @@ flate2 = "1.0"
2424
tar = "0.4"
2525

2626
[features]
27+
"22_0" = []
2728
"0_21_1" = []
2829
"0_21_0" = []
2930
"0_20_1" = []

build.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ fn download_filename() -> String {
1919
}
2020

2121
fn get_expected_sha256(filename: &str) -> Result<sha256::Hash, ()> {
22-
let sha256sums_filename = format!("sha256/bitcoin-core-{}-SHA256SUMS.asc", &VERSION);
22+
let sha256sums_filename = format!("sha256/bitcoin-core-{}-SHA256SUMS", &VERSION);
23+
#[cfg(any(
24+
feature = "0_21_1",
25+
feature = "0_21_0",
26+
feature = "0_20_1",
27+
feature = "0_20_0",
28+
feature = "0_19_1",
29+
feature = "0_19_0_1",
30+
feature = "0_18_1",
31+
feature = "0_18_0",
32+
feature = "0_17_1",
33+
))]
34+
let sha256sums_filename = format!("{}.asc", sha256sums_filename);
2335
let file = File::open(sha256sums_filename).map_err(|_| ())?;
2436
for line in BufReader::new(file).lines().flatten() {
2537
let tokens: Vec<_> = line.split(" ").collect();

sha256/bitcoin-core-22.0-SHA256SUMS

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
9547fa03574f8bde296f707c7d9f7d89827c75c5a28f84402578a4fa92a787ec bitcoin-22.0-aarch64-linux-gnu-debug.tar.gz
2+
ac718fed08570a81b3587587872ad85a25173afa5f9fbbd0c03ba4d1714cfa3e bitcoin-22.0-aarch64-linux-gnu.tar.gz
3+
80071e0ecd24edfec8a1972b495b9822c79a5d33c7123bff51688638aac97cab bitcoin-22.0-arm-linux-gnueabihf-debug.tar.gz
4+
b8713c6c5f03f5258b54e9f436e2ed6d85449aa24c2c9972f91963d413e86311 bitcoin-22.0-arm-linux-gnueabihf.tar.gz
5+
8f70852feb39078e02182563517d17bdfc4a12904cf1bdabbae95594d9a1e473 bitcoin-22.0-codesignatures-22.0.tar.gz
6+
d0e9d089b57048b1555efa7cd5a63a7ed042482045f6f33402b1df425bf9613b bitcoin-22.0.tar.gz
7+
bfc04a3c4e8b613bfd9359e54da6cc60f027860e9723f9a6bfd6f13873eb811f bitcoin-22.0-powerpc64-linux-gnu-debug.tar.gz
8+
2cca5f99007d060aca9d8c7cbd035dfe2f040dd8200b210ce32cdf858479f70d bitcoin-22.0-powerpc64-linux-gnu.tar.gz
9+
5f0bf1491bc8825ca1506f7cf586030f06bb17a563ccde92e8c75720022704e6 bitcoin-22.0-powerpc64le-linux-gnu-debug.tar.gz
10+
91b1e012975c5a363b5b5fcc81b5b7495e86ff703ec8262d4b9afcfec633c30d bitcoin-22.0-powerpc64le-linux-gnu.tar.gz
11+
59b16e63aa935f50fd2813efe7f137187fcf0fff84e3205a9c6cb462a8bb160c bitcoin-22.0-riscv64-linux-gnu-debug.tar.gz
12+
9cc3a62c469fe57e11485fdd32c916f10ce7a2899299855a2e479256ff49ff3c bitcoin-22.0-riscv64-linux-gnu.tar.gz
13+
3b3e2680f7d9304c13bfebaf6445ada40d72324b4b3e0a07de9db807389a6c5b bitcoin-22.0-osx-signed.dmg
14+
52449aa894a6ce5653315e1260d0ce87c1d9f490afe3c92b44285710804b11ae bitcoin-22.0-osx-unsigned.dmg
15+
f51156774c24c0ac5cc30237fa08aa17ed04a180dfd72c3e7d20fdc3f45806dc bitcoin-22.0-osx-unsigned.tar.gz
16+
2744d199c3343b2d94faffdfb2c94d75a630ba27301a70e47b0ad30a7e0155e9 bitcoin-22.0-osx64.tar.gz
17+
3a4f05657c048d3e9505bdb9c4fb3658e5e3d4233b0b93c1853e080620589765 bitcoin-22.0-x86_64-linux-gnu-debug.tar.gz
18+
59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16 bitcoin-22.0-x86_64-linux-gnu.tar.gz
19+
9169989d649937c0f9ebccd3ab088501328aa319fe9e91fc7ea8e8cf0fcccede bitcoin-22.0-win64-setup.exe
20+
f890473d6d910d478f8ff08f9356d0305d19b46cf06e4fc3b5a49b0b684fd2a7 bitcoin-22.0-win-unsigned.tar.gz
21+
0a97ebc8ae44913e3ef9c5b1ddd2af3a4ffb0ba25b6ab1ee8173e40e60499402 bitcoin-22.0-win64-debug.zip
22+
ecc579d006230d6ffc5a5b7b53ce8c76477d37c1c7bad69694e9c2d69f00331d bitcoin-22.0-win64-setup-unsigned.exe
23+
9485e4b52ed6cebfe474ab4d7d0c1be6d0bb879ba7246a8239326b2230a77eb1 bitcoin-22.0-win64.zip

src/versions.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pub const HAS_FEATURE: bool = cfg!(any(
2+
feature = "22_0",
23
feature = "0_21_1",
34
feature = "0_21_0",
45
feature = "0_20_1",
@@ -11,6 +12,7 @@ pub const HAS_FEATURE: bool = cfg!(any(
1112
));
1213

1314
#[cfg(not(any(
15+
feature = "22_0",
1416
feature = "0_21_1",
1517
feature = "0_21_0",
1618
feature = "0_20_1",
@@ -23,6 +25,9 @@ pub const HAS_FEATURE: bool = cfg!(any(
2325
)))]
2426
pub const VERSION: &str = "N/A";
2527

28+
#[cfg(feature = "22_0")]
29+
pub const VERSION: &str = "22.0";
30+
2631
#[cfg(feature = "0_21_1")]
2732
pub const VERSION: &str = "0.21.1";
2833

0 commit comments

Comments
 (0)