From 135238b855c9910f1ea3475ab7ce83d660f8a061 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 29 Aug 2024 15:03:21 +1000 Subject: [PATCH] Support latest Bitcoin Core v26 minor version Bitcoin Core versions `26.1` and `26.2` are out, we should support both. --- client/src/client_sync/v26.rs | 2 +- integration_test/Cargo.toml | 4 ++- regtest/Cargo.toml | 8 +++--- regtest/sha256/bitcoin-core-26.1-SHA256SUMS | 27 +++++++++++++++++++++ regtest/sha256/bitcoin-core-26.2-SHA256SUMS | 27 +++++++++++++++++++++ regtest/src/client_versions.rs | 14 ++++++++--- regtest/src/versions.rs | 10 ++++++-- 7 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 regtest/sha256/bitcoin-core-26.1-SHA256SUMS create mode 100644 regtest/sha256/bitcoin-core-26.2-SHA256SUMS diff --git a/client/src/client_sync/v26.rs b/client/src/client_sync/v26.rs index 4e1199f..eb15e42 100644 --- a/client/src/client_sync/v26.rs +++ b/client/src/client_sync/v26.rs @@ -26,7 +26,7 @@ crate::impl_client_v17__generatetoaddress!(); // == Network == crate::impl_client_v17__getnetworkinfo!(); -crate::impl_client_check_expected_server_version!({ [260000] }); +crate::impl_client_check_expected_server_version!({ [260000, 260100, 260200] }); // == Rawtransactions == crate::impl_client_v17__sendrawtransaction!(); diff --git a/integration_test/Cargo.toml b/integration_test/Cargo.toml index 3b8b80b..527b42a 100644 --- a/integration_test/Cargo.toml +++ b/integration_test/Cargo.toml @@ -8,11 +8,13 @@ edition = "2021" # Please note, in this crate the version features are mutally exclusive. # -# - `cargo test --all-features` is the same as `cargo test --features=v26_0` +# - `cargo test --all-features` is the same as `cargo test --features=v26_2` # - `cargo test --no-default-features` skips all tests. [features] # Enable the same feature in `bitcoind` and the version feature here. # All minor releases (but only the latest patch release). +"26_2" = ["v26", "bitcoind/26_2"] +"26_1" = ["v26", "bitcoind/26_1"] "26_0" = ["v26", "bitcoind/26_0"] "25_2" = ["v25", "bitcoind/25_2"] "25_1" = ["v25", "bitcoind/25_1"] diff --git a/regtest/Cargo.toml b/regtest/Cargo.toml index 2d3c7c6..db822a0 100644 --- a/regtest/Cargo.toml +++ b/regtest/Cargo.toml @@ -35,13 +35,15 @@ anyhow = "1.0.66" # Please note, in this crate the version features are mutally exclusive. # -# - `cargo test --all-features` is the same as `cargo test --features=v26_0` -# - `cargo test --no-default-features` uses `v26_0` also. +# - `cargo test --all-features` is the same as `cargo test --features=v26_2` +# - `cargo test --no-default-features` uses `v26_2` also. [features] # download is not supposed to be used directly only through selecting one of the version feature "download" = ["bitcoin_hashes", "flate2", "tar", "minreq", "zip"] # We support all minor releases (but only the latest patch release). +"26_2" = ["download", "26_1"] +"26_1" = ["download", "26_0"] "26_0" = ["download", "25_2"] "25_2" = ["download", "25_1"] "25_1" = ["download", "25_0"] @@ -65,7 +67,7 @@ anyhow = "1.0.66" [package.metadata.docs.rs] -features = ["download", "doc", "26_0"] +features = ["download", "doc", "26_2"] rustdoc-args = ["--cfg", "docsrs"] [patch.crates-io.bitcoind-json-rpc-client] diff --git a/regtest/sha256/bitcoin-core-26.1-SHA256SUMS b/regtest/sha256/bitcoin-core-26.1-SHA256SUMS new file mode 100644 index 0000000..2880aec --- /dev/null +++ b/regtest/sha256/bitcoin-core-26.1-SHA256SUMS @@ -0,0 +1,27 @@ +401c093314fb517d801d4930155e5bf9fb67f45408fa81fda8dd44dd5cd915b6 bitcoin-26.1-aarch64-linux-gnu-debug.tar.gz +e198461d981b675d39caaec4d5e69e79d7fd52c3d3508f5821e2effe7d4f12c2 bitcoin-26.1-aarch64-linux-gnu.tar.gz +f515ac510dc685a8466ca09c2180b60c0be2e7eb24b46aaf80e7e3e3fa650e37 bitcoin-26.1-arm-linux-gnueabihf-debug.tar.gz +7e655c8fd72277f6b3467ae2330e5b24913f5e06089ffb24ec4464d961d5e0c2 bitcoin-26.1-arm-linux-gnueabihf.tar.gz +8f0bdc51733a94f83cb96a215943291de64b501bbe0298a9b897f79d8ad517e9 bitcoin-26.1-arm64-apple-darwin.zip +ac5ec560807023d33ea4a5d01c61b7ea8ba9d1756fda1408d96f5c403d3bafbe bitcoin-26.1-arm64-apple-darwin-unsigned.tar.gz +2d180af4902519f88252b973f054fbac656232aed420ab60663a7944a3864a31 bitcoin-26.1-arm64-apple-darwin-unsigned.zip +8a8e415763b7ffd5988153cf03967d812eca629016dd3b0ddf6da3ab6f4a3621 bitcoin-26.1-arm64-apple-darwin.tar.gz +fe57b905ecbb1793356315c947bfd60933cdce25940d9fbc7e8d94896a5e49af bitcoin-26.1-codesignatures-26.1.tar.gz +9164ee5d717b4a20cb09f0496544d9d32f365734814fe399f5cdb4552a9b35ee bitcoin-26.1.tar.gz +646538125b7575db2bbecf22222353957b5ce625d94bc35a66ca1a6a3c3b754d bitcoin-26.1-powerpc64-linux-gnu-debug.tar.gz +d7ed4a32d0242a4183b34dcc223d6aa23d18dee31fe683636139b4532fda2f46 bitcoin-26.1-powerpc64-linux-gnu.tar.gz +16ec62a47413b0153c67e989ec6a80501ea23f027df680a30d30a32345bf36ac bitcoin-26.1-powerpc64le-linux-gnu-debug.tar.gz +574e82550b261db0826391b5b41c687235646b7c0179371f617ed3a61d142bab bitcoin-26.1-powerpc64le-linux-gnu.tar.gz +12675195b33a559a0152f3598eb42a93cdbaebaee3e3ecf58b13764ee3dbb423 bitcoin-26.1-riscv64-linux-gnu-debug.tar.gz +b05b6b10c4ec2bd9c2fb340d019397e55d592cd431fed3bc0acf4479964969d0 bitcoin-26.1-riscv64-linux-gnu.tar.gz +8fd415bfd0ba2d967d1fd03433b150e9b739a08f86c58c6d4dd0f8506a41fc12 bitcoin-26.1-x86_64-apple-darwin.zip +10a63e6ac62cfb8132ba94b88c597c1fa768185478759663541ee9e19fe02a99 bitcoin-26.1-x86_64-apple-darwin-unsigned.tar.gz +e6bedda1cd8b852df6885b2252d86547da645e2d9ade25aaf9ec28264b4aec5e bitcoin-26.1-x86_64-apple-darwin-unsigned.zip +acb50edd20692a9d023de12da573b64ca0fd9b4e9a2b88d1251020a3022b0f27 bitcoin-26.1-x86_64-apple-darwin.tar.gz +4c7fdad8f76458b91fe84c1f66f76ef0292b0de3d6408070c6ede104b36967c1 bitcoin-26.1-x86_64-linux-gnu-debug.tar.gz +a5b7d206384a8100058d3f2e2f02123a8e49e83f523499e70e86e121a4897d5b bitcoin-26.1-x86_64-linux-gnu.tar.gz +8ed4feeae2ab631f5f48e9f56c52a7bcf442501cf2f04c990f1e85b761314a67 bitcoin-26.1-win64-setup.exe +a0aaea3e7b2bab22dfe4a4cc33aef5bc23dccf2eda14e26f65872ed79af75f9f bitcoin-26.1-win64-debug.zip +946f92d27a6b05b09bd63e245208be639ff26699d2d4ab7d7c9f6e3649185982 bitcoin-26.1-win64-setup-unsigned.exe +b6f5b28de625c34e0bffee449cdb5324e36c6b80a1b92cb894f436ed8157842a bitcoin-26.1-win64-unsigned.tar.gz +7bd0849e47472aeff99a0ea2c0cefd98f5be829e5a2d3b0168b5a54456cc638a bitcoin-26.1-win64.zip diff --git a/regtest/sha256/bitcoin-core-26.2-SHA256SUMS b/regtest/sha256/bitcoin-core-26.2-SHA256SUMS new file mode 100644 index 0000000..97b722d --- /dev/null +++ b/regtest/sha256/bitcoin-core-26.2-SHA256SUMS @@ -0,0 +1,27 @@ +49521ec94ebb523b49007a96eb18c1ab7c650c28222203104d17cdb569c58ded bitcoin-26.2-aarch64-linux-gnu-debug.tar.gz +f9d723aec022b9a857f27a76fc3500f8d82ce02ca496e0d907c07081437204c8 bitcoin-26.2-aarch64-linux-gnu.tar.gz +b5bc5a35e3bef4ee2633563df57e38b83cd1103f259a7844dc7e283049986fb0 bitcoin-26.2-arm-linux-gnueabihf-debug.tar.gz +4b767fe48867825b9e1efa8ef16570410adeb099869103eaec99b664708118d6 bitcoin-26.2-arm-linux-gnueabihf.tar.gz +d3f8f9a8da2ff6c0f7d29646c23c0028c6042bbcda35c28830ce6511c840d9c0 bitcoin-26.2-arm64-apple-darwin.zip +0d104144ee3888fbf4ac0cb01c087966625025a70394852a9db33425debce4e9 bitcoin-26.2-arm64-apple-darwin-unsigned.tar.gz +edd5e07d0b99a05d88b79f6f19e8619a24a27e27225232f3b904db567644a7d5 bitcoin-26.2-arm64-apple-darwin-unsigned.zip +863960b4f78130ebb9a5e7f68e5cc021778892ff9b3f8b060056c485470640d5 bitcoin-26.2-arm64-apple-darwin.tar.gz +633fa765be8b371ef9dc174803dd7b2d716855f4c87e8f27e9ade0b588b9030a bitcoin-26.2-codesignatures-26.2.tar.gz +78d59418741f45cbdaa9bf20ebc49a5e95ff9f7172f72fc78d14307eaf341b3c bitcoin-26.2.tar.gz +a4cebb8873f05609b10763c35a32da8f798db55676c669e3d64249fecc7f1409 bitcoin-26.2-powerpc64-linux-gnu-debug.tar.gz +3fe1350951e72be109ce28d679776cb8f630d0db39a5b1c342856e0527478142 bitcoin-26.2-powerpc64-linux-gnu.tar.gz +015b925c04590fbe8d198e5bf2d5a5903efdbd71a052df94a836390cbbd9283b bitcoin-26.2-powerpc64le-linux-gnu-debug.tar.gz +0344a286b16c117d486dcd2e721a055072b77bab7cfa542ab6c22268591de1f6 bitcoin-26.2-powerpc64le-linux-gnu.tar.gz +bf12bcc0aeae60abf51841a14b67c48fdca5ee8e276d1bd72a76867e5825cc45 bitcoin-26.2-riscv64-linux-gnu-debug.tar.gz +60bf104a6467d105439507526be0ebee47cc0436a831562a4253e4e113af3a21 bitcoin-26.2-riscv64-linux-gnu.tar.gz +dd83901d294e7d9de150a85cffd1aadb2d674c15e8b23473e8d3770e21df5ef5 bitcoin-26.2-x86_64-apple-darwin.zip +f238818530a9c0cbc1ad6d5ece3099a3eb324a407b4742ab9baf127e084e1774 bitcoin-26.2-x86_64-apple-darwin-unsigned.tar.gz +a6efec89816073246d40b29b5bb4ec3426f624c7e1a16252cba3f60ca8cac896 bitcoin-26.2-x86_64-apple-darwin-unsigned.zip +8a15491cb1ea1a11c667b31606563e3a325e0ae1ff250e86a8453630f3c966f1 bitcoin-26.2-x86_64-apple-darwin.tar.gz +bb60a33684301e5848f21e573f18440ac1a8cc5ed711372766c8174b4f33ba04 bitcoin-26.2-x86_64-linux-gnu-debug.tar.gz +77c63bec845b318c07f3a7660c579f63da18b58d25699ab8b8df6034e8ed55c0 bitcoin-26.2-x86_64-linux-gnu.tar.gz +f9e359602e138681cb652013901dd9c5d9341b9da2507e7180bc35c8db13e288 bitcoin-26.2-win64-setup.exe +0ec3e2e1c3a198612c3ce97b279fdebe85cf47ac8caf3e34395988d51e8249b2 bitcoin-26.2-win64-debug.zip +1d9d030f1b7f105ed3d58a52c9285d4f175f9d89b1eedacb0515c55a01b7023c bitcoin-26.2-win64-setup-unsigned.exe +0232ae5c288a1c2ccc3d0966da2162f7f9998f5fc947a3febf2f1f9ec77fbea0 bitcoin-26.2-win64-unsigned.tar.gz +9251aa806244ac176d09bbe0a3808247d791e48ce3a6b6256adfdd14d9135e0f bitcoin-26.2-win64.zip diff --git a/regtest/src/client_versions.rs b/regtest/src/client_versions.rs index ae854c1..7b98ebf 100644 --- a/regtest/src/client_versions.rs +++ b/regtest/src/client_versions.rs @@ -1,15 +1,23 @@ -// All features uses 26_0 +// All features uses 26_2 /// The version specific client and json types. /// /// **THIS IS AVAILABLE FOR ALL VERSION NUMBER FEATURES** (eg `25_0`, `24_2` etc). This crate is /// unusual in that it expects exactly one version number feature to be selected, docs.rs is not set /// up to handle such oddity. /// +#[cfg(feature = "26_2")] +#[allow(unused_imports)] // Not all users need the json types. +pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; + +#[cfg(feature = "26_1")] +#[allow(unused_imports)] // Not all users need the json types. +pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; + #[cfg(feature = "26_0")] #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; -#[cfg(all(feature = "25_2", not(feature = "26_0")))] +#[cfg(all(feature = "25_2", not(feature = "26_2")))] #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v25::{Client, AddressType}, json::v25 as json}; @@ -74,6 +82,6 @@ pub use bitcoind_json_rpc_client::{client_sync::v18::{Client, AddressType}, json pub use bitcoind_json_rpc_client::{client_sync::v17::{Client, AddressType}, json::v17 as json}; // To make --no-default-features work we have to re-export a the types, use most recent version same as we do for all features. -#[cfg(all(not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] +#[cfg(all(not(feature = "26_2"), not(feature = "26_1"), not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; diff --git a/regtest/src/versions.rs b/regtest/src/versions.rs index 1c5767c..e3c1c44 100644 --- a/regtest/src/versions.rs +++ b/regtest/src/versions.rs @@ -1,4 +1,10 @@ -#[cfg(feature = "26_0")] +#[cfg(feature = "26_2")] +pub const VERSION: &str = "26.2"; + +#[cfg(all(feature = "26_1", not(feature = "26_2")))] +pub const VERSION: &str = "26.1"; + +#[cfg(all(feature = "26_0", not(feature = "26_1")))] pub const VERSION: &str = "26.0"; #[cfg(all(feature = "25_2", not(feature = "26_0")))] @@ -50,6 +56,6 @@ pub const VERSION: &str = "0.18.1"; pub const VERSION: &str = "0.17.1"; // To make --no-default-features work we have to enable some feature, use most recent version same as for default. -#[cfg(all(not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] +#[cfg(all(not(feature = "26_2"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] #[allow(dead_code)] // for --no-default-features pub const VERSION: &str = "26.0";