-
Notifications
You must be signed in to change notification settings - Fork 68
Add support for Bitcoin Core 31.0 #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e6bcc02
f483441
6fcae63
5747ced
3fb287f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| 91917647aaf50965fc834e048256fce17e8f5590658c7e8de2879fb66cdc9a73 bitcoin-31.0-aarch64-linux-gnu-debug.tar.gz | ||
| 4de1d568dedd48604f75132421bc0abeca432639589b49a3909c81db3a813112 bitcoin-31.0-aarch64-linux-gnu.tar.gz | ||
| fc17562b66707d0c8d1863af0cd40d7c6818a8d7d7b360b8d43276b1593924d9 bitcoin-31.0-arm-linux-gnueabihf-debug.tar.gz | ||
| 8c19d007bfc73502625095ea4073af3a98ceb722d500556ab173bac5bcadd0d6 bitcoin-31.0-arm-linux-gnueabihf.tar.gz | ||
| a2d7a13b4da53d4a3e4c517f3a0269e2429813417bb320d3b268993cfdc545d0 bitcoin-31.0-arm64-apple-darwin.tar.gz | ||
| fc119a34915daac57e5fbdf181c9295d862d6843d52a9380e39dc0d0ac69cf20 bitcoin-31.0-arm64-apple-darwin.zip | ||
| 955563c720b4d5fc22a11d4b102940d605f1cb9eb0b564f50deb606412c631e5 bitcoin-31.0-arm64-apple-darwin-codesigning.tar.gz | ||
| 48d34a140aeaacd63a4bd37c24ed1876df4b077c98a7e0dd9a4483d1032839f4 bitcoin-31.0-arm64-apple-darwin-unsigned.tar.gz | ||
| b639946d343114cca5d87b218aaece04d0d111374b725d90dffc7e2d1d3b99f5 bitcoin-31.0-arm64-apple-darwin-unsigned.zip | ||
| 7e45bab1787af974307fc077e6688d3eaab6788f3ad0e3a65d8cc9e428c41219 bitcoin-31.0-codesignatures-31.0.tar.gz | ||
| 0ba0ef5eea3aefd96cc1774be274c3d594812cfac0988809d706738bb067b3e3 bitcoin-31.0.tar.gz | ||
| efe3e7d0383d54e5d79ac47911be0100b99872fa5205510a2a22d1194a0212d8 bitcoin-31.0-powerpc64-linux-gnu-debug.tar.gz | ||
| 1d9c865aa0ccf675fc068e79d9fa57a5a70b59132fca38bb322a7d44ce2f0ff2 bitcoin-31.0-powerpc64-linux-gnu.tar.gz | ||
| acd0e38f4bb99c7c3024e494ca218d3ae67ec4a8b3b7ae556a8292353fe308b5 bitcoin-31.0-riscv64-linux-gnu-debug.tar.gz | ||
| 7ece4ea365bba9b2008b27f0717ef6a518598a572edaa2815e775faadc53c136 bitcoin-31.0-riscv64-linux-gnu.tar.gz | ||
| 56824dd705bc2a3b22d42e8aa02ed53498d491ff7c2c8aa96831333871887ead bitcoin-31.0-x86_64-apple-darwin.tar.gz | ||
| 8e230f36a2020072763adf742b20d95348cb20aaa0b0a918ca44ecdc83ac4efd bitcoin-31.0-x86_64-apple-darwin.zip | ||
| fccf54f31bd58a3f834add05fa5df36520313d936445c556be8f71ccf314b658 bitcoin-31.0-x86_64-apple-darwin-codesigning.tar.gz | ||
| d1d0174f07cf87d9af4318f7072350510fa0f1bf8d3d3b1ee7143ad5967b6bdf bitcoin-31.0-x86_64-apple-darwin-unsigned.tar.gz | ||
| b8d9b9915a1871ee12a3a9883fd47860028454fcd192864735f2e0d3a88b4735 bitcoin-31.0-x86_64-apple-darwin-unsigned.zip | ||
| 96e3506195c5cc2ea9ca72fb2ddcbcf5246dd0db0d21d726f3c98eaf0c6b9078 bitcoin-31.0-x86_64-linux-gnu-debug.tar.gz | ||
| d3e4c58a35b1d0a97a457462c94f55501ad167c660c245cb1ffa565641c65074 bitcoin-31.0-x86_64-linux-gnu.tar.gz | ||
| 1893e819d7554ca43e6e812dc642bd1fb4570a4077b07a03180ad1041e74e223 bitcoin-31.0-win64-setup.exe | ||
| 82fd2c504a0f20a31d4d13bd407783d6fc7bf17622d0ce85228a9b92694e03f0 bitcoin-31.0-win64.zip | ||
| 62baf547357029ac557d6fbbe91742c4ba6c1461c19ed4fab5131d4300b74d93 bitcoin-31.0-win64-codesigning.tar.gz | ||
| df3f8c2f6ce8fde8d2661d3c01f5265f90f938019d52e2f94acf2a9001af70ae bitcoin-31.0-win64-debug.zip | ||
| ad31d4d82a0ddcf1340a447575ca958ee664656ca2e77282737898e1b8209ec8 bitcoin-31.0-win64-setup-unsigned.exe | ||
| 5ecd365b53a2896850178f90302375480933e6c85ef81bb8abe8675fd44e1d9c bitcoin-31.0-win64-unsigned.zip |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,10 @@ | |
|
|
||
| #![allow(unused_imports)] // Not all users need the json types. | ||
|
|
||
| #[cfg(feature = "30_0")] | ||
| #[cfg(feature = "31_0")] | ||
| pub use corepc_client::{client_sync::v31::*, types::v31 as vtype}; | ||
|
|
||
| #[cfg(all(feature = "30_0", not(feature = "31_0")))] | ||
| pub use corepc_client::{client_sync::v30::*, types::v30 as vtype}; | ||
|
|
||
| #[cfg(all(feature = "29_0", not(feature = "30_0")))] | ||
|
|
@@ -63,6 +66,7 @@ pub use corepc_client::{client_sync::v17::*, types::v17 as vtype}; | |
| /// This is meaningless but we need it otherwise we can't get far enough into | ||
| /// the build process to trigger the `compile_error!` in `./versions.rs`. | ||
| #[cfg(all( | ||
| not(feature = "31_0"), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Below, you introduced a simplification for this case in bitcoind/src/versions.rs, which I think could also be applied here because it is the same pattern. |
||
| not(feature = "30_0"), | ||
| not(feature = "29_0"), | ||
| not(feature = "28_2"), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| // An explicit version of Bitcoin Core must be selected by enabling some feature. | ||
| // We check this here instead of in `lib.rs` because this file is included in `build.rs`. | ||
| #[cfg(all( | ||
| not(feature = "31_0"), | ||
| not(feature = "30_2"), | ||
| not(feature = "30_0"), | ||
| not(feature = "29_0"), | ||
|
|
@@ -23,8 +24,11 @@ | |
| ))] | ||
| compile_error!("enable a feature in order to select the version of Bitcoin Core to use"); | ||
|
|
||
| #[cfg(feature = "30_2")] | ||
| #[cfg(feature = "31_0")] | ||
| #[allow(dead_code)] // Triggers in --all-features builds. | ||
| pub const VERSION: &str = "31.0"; | ||
|
|
||
| #[cfg(all(feature = "30_2", not(feature = "31_0")))] | ||
| pub const VERSION: &str = "30.2"; | ||
|
|
||
| #[cfg(all(feature = "30_0", not(feature = "30_2")))] | ||
|
|
@@ -81,26 +85,6 @@ pub const VERSION: &str = "0.18.1"; | |
| #[cfg(all(feature = "0_17_2", not(feature = "0_18_1")))] | ||
| pub const VERSION: &str = "0.17.2"; | ||
|
|
||
| /// This is meaningless but we need it otherwise we can't get far enough into | ||
| /// the build process to trigger the `compile_error!` in `./versions.rs`. | ||
| #[cfg(all( | ||
| not(feature = "30_0"), | ||
| not(feature = "29_0"), | ||
| not(feature = "28_2"), | ||
| not(feature = "28_1"), | ||
| not(feature = "28_0"), | ||
| not(feature = "27_2"), | ||
| not(feature = "27_1"), | ||
| not(feature = "27_0"), | ||
| not(feature = "26_2"), | ||
| not(feature = "25_2"), | ||
| not(feature = "24_2"), | ||
| not(feature = "23_2"), | ||
| not(feature = "22_1"), | ||
| not(feature = "0_21_2"), | ||
| not(feature = "0_20_2"), | ||
| not(feature = "0_19_1"), | ||
| not(feature = "0_18_1"), | ||
| not(feature = "0_17_2") | ||
| ))] | ||
| // This makes the build error more succinct if someone tries to build with --no-default-features. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the simplification I referred to. |
||
| #[cfg(not(feature = "0_17_2"))] | ||
| pub const VERSION: &str = "never-used"; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,214 @@ | ||
| // SPDX-License-Identifier: CC0-1.0 | ||
|
|
||
| //! A JSON-RPC client for testing against Bitcoin Core `v31`. | ||
| //! | ||
| //! We ignore option arguments unless they effect the shape of the returned JSON data. | ||
|
|
||
| use std::collections::BTreeMap; | ||
| use std::path::Path; | ||
|
|
||
| use bitcoin::address::{Address, NetworkChecked}; | ||
| use bitcoin::{sign_message, Amount, Block, BlockHash, PublicKey, Txid}; | ||
| use serde_json::json; | ||
|
|
||
| use crate::client_sync::into_json; | ||
| use crate::types::v31::*; | ||
|
|
||
| #[rustfmt::skip] // Keep public re-exports separate. | ||
| pub use crate::client_sync::{ | ||
| v17::{ | ||
| AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, WalletCreateFundedPsbtInput, | ||
| FeeEstimateMode, | ||
| }, | ||
| v21::ImportDescriptorsRequest, | ||
| v23::AddressType, | ||
| v29::{TemplateRequest, TemplateRules} | ||
| }; | ||
|
|
||
| crate::define_jsonrpc_bitreq_client!("v31"); | ||
| crate::impl_client_check_expected_server_version!({ [310000] }); | ||
|
|
||
| // == Blockchain == | ||
| crate::impl_client_v29__dump_tx_out_set!(); | ||
| crate::impl_client_v17__get_best_block_hash!(); | ||
| crate::impl_client_v29__get_block!(); | ||
| crate::impl_client_v17__get_blockchain_info!(); | ||
| crate::impl_client_v17__get_block_count!(); | ||
| crate::impl_client_v19__get_block_filter!(); | ||
| crate::impl_client_v23__get_block_from_peer!(); | ||
| crate::impl_client_v17__get_block_hash!(); | ||
| crate::impl_client_v17__get_block_header!(); | ||
| crate::impl_client_v17__get_block_stats!(); | ||
| crate::impl_client_v26__get_chain_states!(); | ||
| crate::impl_client_v17__get_chain_tips!(); | ||
| crate::impl_client_v17__get_chain_tx_stats!(); | ||
| crate::impl_client_v23__get_deployment_info!(); | ||
| crate::impl_client_v30__get_descriptor_activity!(); | ||
| crate::impl_client_v17__get_difficulty!(); | ||
| crate::impl_client_v17__get_mempool_ancestors!(); | ||
| crate::impl_client_v17__get_mempool_descendants!(); | ||
| crate::impl_client_v17__get_mempool_entry!(); | ||
| crate::impl_client_v17__get_mempool_info!(); | ||
| crate::impl_client_v21__get_raw_mempool!(); | ||
| crate::impl_client_v17__get_tx_out!(); | ||
| crate::impl_client_v17__get_tx_out_proof!(); | ||
| crate::impl_client_v26__get_tx_out_set_info!(); | ||
| crate::impl_client_v24__get_tx_spending_prevout!(); | ||
| crate::impl_client_v26__import_mempool!(); | ||
| crate::impl_client_v26__load_tx_out_set!(); | ||
| crate::impl_client_v17__precious_block!(); | ||
| crate::impl_client_v17__prune_blockchain!(); | ||
| crate::impl_client_v23__save_mempool!(); | ||
| crate::impl_client_v25__scan_blocks!(); | ||
| crate::impl_client_v17__scan_tx_out_set!(); | ||
| crate::impl_client_v17__verify_chain!(); | ||
| crate::impl_client_v17__verify_tx_out_proof!(); | ||
| crate::impl_client_v17__estimate_raw_fee!(); | ||
| crate::impl_client_v17__wait_for_block!(); | ||
| crate::impl_client_v17__wait_for_block_height!(); | ||
| crate::impl_client_v17__wait_for_new_block!(); | ||
|
|
||
| // == Control == | ||
| crate::impl_client_v17__get_memory_info!(); | ||
| crate::impl_client_v18__get_rpc_info!(); | ||
| crate::impl_client_v17__help!(); | ||
| crate::impl_client_v17__logging!(); | ||
| crate::impl_client_v17__stop!(); | ||
| crate::impl_client_v17__uptime!(); | ||
|
|
||
| // == Generating == | ||
| crate::impl_client_v25__generate_block!(); | ||
| crate::impl_client_v17__generate_to_address!(); | ||
| crate::impl_client_v20__generate_to_descriptor!(); | ||
| crate::impl_client_v17__invalidate_block!(); | ||
|
|
||
| // == Hidden == | ||
| crate::impl_client_v27__add_connection!(); | ||
| crate::impl_client_v21__add_peer_address!(); | ||
| crate::impl_client_v29__get_orphan_txs!(); | ||
| crate::impl_client_v29__get_orphan_txs_verbosity_1!(); | ||
| crate::impl_client_v29__get_orphan_txs_verbosity_2!(); | ||
| crate::impl_client_v26__get_raw_addrman!(); | ||
| crate::impl_client_v20__mock_scheduler!(); | ||
| crate::impl_client_v17__reconsider_block!(); | ||
| crate::impl_client_v17__sync_with_validation_interface_queue!(); | ||
|
|
||
| // == Mining == | ||
| crate::impl_client_v17__get_block_template!(); | ||
| crate::impl_client_v17__get_mining_info!(); | ||
| crate::impl_client_v17__get_network_hashes_per_second!(); | ||
| crate::impl_client_v26__get_prioritised_transactions!(); | ||
| crate::impl_client_v17__prioritise_transaction!(); | ||
| crate::impl_client_v17__submit_block!(); | ||
| crate::impl_client_v18__submit_header!(); | ||
|
|
||
| // == Network == | ||
| crate::impl_client_v17__add_node!(); | ||
| crate::impl_client_v17__clear_banned!(); | ||
| crate::impl_client_v17__disconnect_node!(); | ||
| crate::impl_client_v17__get_added_node_info!(); | ||
| crate::impl_client_v26__get_addr_man_info!(); | ||
| crate::impl_client_v17__get_connection_count!(); | ||
| crate::impl_client_v17__get_net_totals!(); | ||
| crate::impl_client_v17__get_network_info!(); | ||
| crate::impl_client_v18__get_node_addresses!(); | ||
| crate::impl_client_v17__get_peer_info!(); | ||
| crate::impl_client_v17__list_banned!(); | ||
| crate::impl_client_v17__ping!(); | ||
| crate::impl_client_v17__set_ban!(); | ||
| crate::impl_client_v17__set_network_active!(); | ||
|
|
||
| // == Rawtransactions == | ||
| crate::impl_client_v18__analyze_psbt!(); | ||
| crate::impl_client_v17__combine_psbt!(); | ||
| crate::impl_client_v17__combine_raw_transaction!(); | ||
| crate::impl_client_v17__convert_to_psbt!(); | ||
| crate::impl_client_v17__create_psbt!(); | ||
| crate::impl_client_v17__create_raw_transaction!(); | ||
| crate::impl_client_v17__decode_psbt!(); | ||
| crate::impl_client_v17__decode_raw_transaction!(); | ||
| crate::impl_client_v17__decode_script!(); | ||
| crate::impl_client_v17__finalize_psbt!(); | ||
| crate::impl_client_v17__fund_raw_transaction!(); | ||
| crate::impl_client_v17__get_raw_transaction!(); | ||
| crate::impl_client_v18__join_psbts!(); | ||
| crate::impl_client_v17__send_raw_transaction!(); | ||
| crate::impl_client_v17__sign_raw_transaction!(); | ||
| crate::impl_client_v17__sign_raw_transaction_with_key!(); | ||
| crate::impl_client_v28__submit_package!(); | ||
| crate::impl_client_v17__test_mempool_accept!(); | ||
| crate::impl_client_v18__utxo_update_psbt!(); | ||
|
|
||
| // == Signer == | ||
| crate::impl_client_v22__enumerate_signers!(); | ||
|
|
||
| // == Util == | ||
| crate::impl_client_v17__create_multisig!(); | ||
| crate::impl_client_v29__derive_addresses!(); | ||
| crate::impl_client_v17__estimate_smart_fee!(); | ||
| crate::impl_client_v18__get_descriptor_info!(); | ||
| crate::impl_client_v21__get_index_info!(); | ||
| crate::impl_client_v17__sign_message_with_priv_key!(); | ||
| crate::impl_client_v17__validate_address!(); | ||
| crate::impl_client_v17__verify_message!(); | ||
|
|
||
| // == Wallet == | ||
| crate::impl_client_v17__abandon_transaction!(); | ||
| crate::impl_client_v17__abort_rescan!(); | ||
| crate::impl_client_v17__backup_wallet!(); | ||
| crate::impl_client_v17__bump_fee!(); | ||
| crate::impl_client_v22__create_wallet!(); | ||
| crate::impl_client_v23__create_wallet!(); | ||
| crate::impl_client_v28__create_wallet_descriptor!(); | ||
| crate::impl_client_v17__encrypt_wallet!(); | ||
| crate::impl_client_v17__get_addresses_by_label!(); | ||
| crate::impl_client_v17__get_address_info!(); | ||
| crate::impl_client_v17__get_balance!(); | ||
| crate::impl_client_v19__get_balances!(); | ||
| crate::impl_client_v28__get_hd_keys!(); | ||
| crate::impl_client_v18__get_received_by_label!(); | ||
| crate::impl_client_v17__get_new_address!(); | ||
| crate::impl_client_v17__get_raw_change_address!(); | ||
| crate::impl_client_v17__get_received_by_address!(); | ||
| crate::impl_client_v17__get_transaction!(); | ||
| crate::impl_client_v17__get_wallet_info!(); | ||
| crate::impl_client_v21__import_descriptors!(); | ||
| crate::impl_client_v17__import_pruned_funds!(); | ||
| crate::impl_client_v17__key_pool_refill!(); | ||
| crate::impl_client_v17__list_address_groupings!(); | ||
| crate::impl_client_v22__list_descriptors!(); | ||
| crate::impl_client_v18__list_received_by_label!(); | ||
| crate::impl_client_v17__list_labels!(); | ||
| crate::impl_client_v17__list_lock_unspent!(); | ||
| crate::impl_client_v17__list_received_by_address!(); | ||
| crate::impl_client_v17__list_since_block!(); | ||
| crate::impl_client_v17__list_transactions!(); | ||
| crate::impl_client_v17__list_unspent!(); | ||
| crate::impl_client_v18__list_wallet_dir!(); | ||
| crate::impl_client_v17__list_wallets!(); | ||
| crate::impl_client_v22__load_wallet!(); | ||
| crate::impl_client_v17__lock_unspent!(); | ||
| crate::impl_client_v24__migrate_wallet!(); | ||
| crate::impl_client_v21__psbt_bump_fee!(); | ||
| crate::impl_client_v17__remove_pruned_funds!(); | ||
| crate::impl_client_v17__rescan_blockchain!(); | ||
| crate::impl_client_v23__restore_wallet!(); | ||
| crate::impl_client_v21__send!(); | ||
| crate::impl_client_v24__send_all!(); | ||
| crate::impl_client_v17__send_many!(); | ||
| crate::impl_client_v21__send_many_verbose!(); | ||
| crate::impl_client_v17__send_to_address!(); | ||
| crate::impl_client_v19__set_wallet_flag!(); | ||
| crate::impl_client_v17__sign_message!(); | ||
| crate::impl_client_v17__sign_raw_transaction_with_wallet!(); | ||
| crate::impl_client_v24__simulate_raw_transaction!(); | ||
| crate::impl_client_v21__unload_wallet!(); | ||
| crate::impl_client_v17__wallet_create_funded_psbt!(); | ||
| crate::impl_client_v22__wallet_display_address!(); | ||
| crate::impl_client_v17__wallet_lock!(); | ||
| crate::impl_client_v17__wallet_passphrase!(); | ||
| crate::impl_client_v17__wallet_passphrase_change!(); | ||
| crate::impl_client_v17__wallet_process_psbt!(); | ||
|
|
||
| // == Zmq == | ||
| crate::impl_client_v17__get_zmq_notifications!(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All sums verified.