Skip to content

Commit

Permalink
upgrade bitcoin versions with highest minor version
Browse files Browse the repository at this point in the history
remove bitcoin versions with a lower minor version
eg. we don't keep 0.21.0 and 0.21.1 but only 0.21.2
  • Loading branch information
RCasatta committed May 19, 2023
1 parent 8dbc7f6 commit 2ee2d54
Show file tree
Hide file tree
Showing 18 changed files with 143 additions and 281 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04]
feature: ["24_0_1", "23_0", "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"]
feature: ["24_0_1", "23_1", "22_1", "0_21_2", "0_20_2", "0_19_1",
"0_18_1", "0_17_1"]
include:
- os: "macos-11"
feature: "0_21_1"
- os: "macos-11"
feature: "22_0"
- os: "macos-11"
feature: "23_0"
feature: "24_0_1"
- os: "windows-2019"
feature: "23_0"
feature: "24_0_1"

steps:
- run: df -h
Expand All @@ -43,7 +39,7 @@ jobs:
- run: echo "BITCOIND_EXE=$(find ./target/debug -name bitcoind)" >> $GITHUB_ENV
if: ${{ matrix.os != 'windows-2019' }}
- run: cargo test
if: ${{ matrix.feature != '0_18_1' && matrix.feature != '0_18_0' && matrix.feature != '0_17_1' && matrix.os != 'windows-2019' }} # would fail `test_multi_wallet`
if: ${{ matrix.feature != '0_18_1' && matrix.feature != '0_17_1' && matrix.os != 'windows-2019' }} # would fail `test_multi_wallet`


cosmetics:
Expand Down
18 changes: 7 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ zip = { version = "0.5", optional = true }
# download is not supposed to be used directly only through selecting one of the version feature
"download" = ["bitcoin_hashes", "flate2", "tar", "minreq", "zip"]

"24_0_1" = ["download", "23_0"]
"23_0" = ["download", "22_0"]
"22_0" = ["download", "0_21_1"]
"0_21_1" = ["download", "0_21_0"]
"0_21_0" = ["download", "0_20_1"]
"0_20_1" = ["download", "0_20_0"]
"0_20_0" = ["download", "0_19_1"]
"0_19_1" = ["download", "0_19_0_1"]
"0_19_0_1" = ["download", "0_18_1"]
"0_18_1" = ["download", "0_18_0"]
"0_18_0" = ["download", "0_17_1"]
"24_0_1" = ["download", "23_1"]
"23_1" = ["download", "22_1"]
"22_1" = ["download", "0_21_2"]
"0_21_2" = ["download", "0_20_2"]
"0_20_2" = ["download", "0_19_1"]
"0_19_1" = ["download", "0_18_1"]
"0_18_1" = ["download", "0_17_1"]
"0_17_1" = ["download"]

"doc" = [] # used only for documentation building
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

Utility to run a regtest bitcoind process, useful in integration testing environment.

When the auto-download feature is selected by activating one of the version feature, such as `23_0`
for bitcoin core 23.0, starting a regtest node is as simple as that:
When the auto-download feature is selected by activating one of the version feature, such as `23_1`
for bitcoin core 23.1, starting a regtest node is as simple as that:

```rust
// the download feature is enabled whenever a specific version is enabled, for example `23_0` or `22_0`
// the download feature is enabled whenever a specific version is enabled, for example `23_1` or `22_1`
#[cfg(feature = "download")]
{
use bitcoincore_rpc::RpcApi;
Expand All @@ -19,7 +19,7 @@ for bitcoin core 23.0, starting a regtest node is as simple as that:
}
```

The build script will automatically download the bitcoin core version 23.0 from [bitcoin core](https://bitcoincore.org),
The build script will automatically download the bitcoin core version 23.1 from [bitcoin core](https://bitcoincore.org),
verify the hashes and place it in the build directory for this crate. If you wish to download from an
alternate location, for example locally for CI, use the `BITCOIND_DOWNLOAD_ENDPOINT` env var.

Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mod download {
any(target_arch = "x86_64", target_arch = "aarch64"),
))]
fn download_filename() -> String {
if cfg!(not(feature = "23_0")) {
if cfg!(not(feature = "23_1")) {
format!("bitcoin-{}-osx64.tar.gz", &VERSION)
} else {
format!("bitcoin-{}-x86_64-apple-darwin.tar.gz", &VERSION)
Expand All @@ -51,7 +51,7 @@ mod download {

fn get_expected_sha256(filename: &str) -> sha256::Hash {
let sha256sums_filename = format!("sha256/bitcoin-core-{}-SHA256SUMS", &VERSION);
#[cfg(not(feature = "22_0"))]
#[cfg(not(feature = "22_1"))]
let sha256sums_filename = format!("{}.asc", sha256sums_filename);
let file = File::open(&sha256sums_filename).unwrap();
for line in BufReader::new(file).lines().flatten() {
Expand Down
30 changes: 0 additions & 30 deletions sha256/bitcoin-core-0.18.0-SHA256SUMS.asc

This file was deleted.

30 changes: 0 additions & 30 deletions sha256/bitcoin-core-0.19.0.1-SHA256SUMS.asc

This file was deleted.

29 changes: 0 additions & 29 deletions sha256/bitcoin-core-0.20.0-SHA256SUMS.asc

This file was deleted.

29 changes: 0 additions & 29 deletions sha256/bitcoin-core-0.20.1-SHA256SUMS.asc

This file was deleted.

29 changes: 29 additions & 0 deletions sha256/bitcoin-core-0.20.2-SHA256SUMS.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

65a29d57ab9c0f4158bdde014c75bd1885542dca43ed414a7e758db1d8ca18a3 bitcoin-0.20.2-aarch64-linux-gnu.tar.gz
ce65624b296dc57444d026d28dc34688e7e8a94b3da137c14ec561bfa02af4c6 bitcoin-0.20.2-arm-linux-gnueabihf.tar.gz
f27d407289ade1f7a9bb1554384728d9a81a0cdc4a1a4f1cadf361f3b5b8512a bitcoin-0.20.2-osx64.tar.gz
0a370aeeee7aa840e9fdd980dd4c239111c518d8eb4c068f72e1e8ec97a57114 bitcoin-0.20.2-osx.dmg
6ead5edb50b8afdbb87fa0ca32a09ceaba3c9c489cd56e7376b457d1dea11612 bitcoin-0.20.2-riscv64-linux-gnu.tar.gz
7e52ef87e37e425227ad0230d3a10421157ff879949b82e8526a1d5877b95593 bitcoin-0.20.2.tar.gz
6bee1cc525f950bb3c665d37b0dcbcecd84c8d238c2abefcce5ed05043290e8e bitcoin-0.20.2-win64-setup.exe
e8a035e18ff5c62171432990b69586192865c673a6e3f2e4503d7535fe3f81fd bitcoin-0.20.2-win64.zip
45b724fe928d78d3c8ca0ff8d7f9c1f4c67d4c4c82673b7b93c9e09251473516 bitcoin-0.20.2-x86_64-linux-gnu.tar.gz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJhdqr1AAoJEJDIAZ42wulkSXEP/R7r27CPGPi12X7UznY08CtF
Ycl59GL/WnLC3UIe2PRIoA7dRSbdoJciGo3kOMUhDT6zgZl69SrOH4Jrw/JhKVZE
sqClaoX/+5tp5lWmLal7KLwrxF53ZfeCuErKkTx1PnebZ74j677bIOTy+UjQe76t
1Tyl/SJCBxCoHOnYAr5UDWW1AgdiY0INBo5yLH6scbVQLuWjOjiGfK15De82jQ1s
oJno90LR5qfC//x2qcDFL4i64uWKbx3qItdIH40Gof9RrnWIpI/wDgSjvFhvcoT1
RSz+qye44FTzmhgXcyQWP+Mjtpbs7DYtObrZT/ik42PeuXfu9gVRk8i7N1gl2/cC
UIERKcpUR/XFM0bHJG7kmDnT3DhCmoOBQQQdm+iZr9TqrI9UQJDNtkV9plj7oZCM
tlcyZQP2TE0YzAZR56Dl1/p/+hnLrzzDyQvjQMHvFPNFwr1/UN/49iuO/mAw6CG0
PGKFSLlpoW2WxlLVUIaLlgj8K3HjR8mx763mpZWivwNHM8qdzQHqU1N3XzM8FlSG
jQpV2uWvIfwruAApVXgYWxh6YeJr81mfQ3QBIbZloDaQOF9xbqKNQfd/6T3w22jr
PjMDOyE3vlRPObkC0Q3eTpFjKoPnuJnmTt800GKzwnziL6i7BusH2NexQjI+H1MT
Jzd2qjgB4BIZVvHItOKy
=cnJX
-----END PGP SIGNATURE-----
29 changes: 0 additions & 29 deletions sha256/bitcoin-core-0.21.0-SHA256SUMS.asc

This file was deleted.

29 changes: 0 additions & 29 deletions sha256/bitcoin-core-0.21.1-SHA256SUMS.asc

This file was deleted.

29 changes: 29 additions & 0 deletions sha256/bitcoin-core-0.21.2-SHA256SUMS.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

c670ead6ad7c45c8c7de9b74445c596a5317573889a98eaae22080a5f7a2574f bitcoin-0.21.2-aarch64-linux-gnu.tar.gz
dfb42778063a2e73e186bdf3634c26612e3dec34b21ec7ecec840f44301b1139 bitcoin-0.21.2-arm-linux-gnueabihf.tar.gz
7180e9e812a651b8af858949735503d621501b9bb537210f32127dc7aff49bd1 bitcoin-0.21.2-osx64.tar.gz
1d54ffee40c2b07629e3b1bc4639b4ca098c8f1cc489340a9ea08a812e3d681c bitcoin-0.21.2-osx.dmg
8a0e2b15908ce1a2dccc9bc1caba006abce0962065c02ee682cb2d1065abe90d bitcoin-0.21.2-riscv64-linux-gnu.tar.gz
4146f751fc5691bdcf911cbdb8d32d8d25c297d29d58173227ae1ae6438edb9e bitcoin-0.21.2.tar.gz
e9101e1ebd8dbf5b4a987ae685fc082fce4f79969bb1e5fe7f81604112df95da bitcoin-0.21.2-win64-setup.exe
ef4080d9677d9e86f72b61a784f0f39b908a1a7a511372553fc2e22b53022b1f bitcoin-0.21.2-win64.zip
67aab7c3dd32f7eb0f3d8ecd66f2da31c4cb969aec4c6a57cb8b01d22fe891e0 bitcoin-0.21.2-x86_64-linux-gnu.tar.gz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJhU/kWAAoJEJDIAZ42wulkmnUP/2lCg/yp9Zo647U67RRpNyQs
Ii92BE8ZnTVcPxOrlpgVuQCMfA1QSBvNntVwigY3YsEnyYSsKUdMVEsRf36fVlTs
DXwDIMoGZOkj9uLasrQ+il84eomoFZjY7fCctIMWeeMeqbF2HroE611FajJuEqBF
G1i7U6bbFJKlvfZutGOU8/DrVbhIKjlL0MEinseUEXmQzw90i6vXT98TnXd60w+Y
4Mj3cD+Qv+9vhuKp0PyxWSbtvsBBNhZoGdB63UlgsYu6Y5UBBM6Zf3vqsRhJ2x7P
ITnkBpiTe9aePi1/3zxWqO29yLxON21FZwrFNLxKupJe2X0ojnXkj/VpSDKPKlU7
SLQpvZ0QTtdTOu9+pa5OV6syfr3xX7bL0o5SRuTZBmvC3O+HgqrVe1Z8Okjgtv6k
Q9RmpRbQou9UFd2NXf6Sx3RYYqNevXVyFhuyjhwUSG1qzY6++E6vNLDN1Z8JDWOB
8lW49acmXsyzJ+dxuMRY81QTRuS9c/oq4HX48Sf+P35lEaJdne9PEmxDdBD1LJMX
626gI71OorcFPdaF0uZ8qTUuoezMfH6JlyxNQFHQve2Y6yuToL0+uUkAPUql6CKh
3PgLeHMrkdswRCcYXKX5Rm8qhFVInaPsQPTcZp1JqWCKho2c0E9LQyE8uRRQXPp2
DrJdnWs6W9X/qrWJu0Y8
=689k
-----END PGP SIGNATURE-----
Loading

0 comments on commit 2ee2d54

Please sign in to comment.