diff --git a/client/src/client_sync/v17/blockchain.rs b/client/src/client_sync/v17/blockchain.rs index 45393c435..6b0103fc9 100644 --- a/client/src/client_sync/v17/blockchain.rs +++ b/client/src/client_sync/v17/blockchain.rs @@ -289,6 +289,19 @@ macro_rules! impl_client_v17__preciousblock { }; } +/// Implements Bitcoin Core JSON-RPC API method `pruneblockchain` +#[macro_export] +macro_rules! impl_client_v17__pruneblockchain { + () => { + impl Client { + /// Instructs the node to prune the blockchain up to a specified height or timestamp. + pub fn prune_blockchain(&self, target: u64) -> Result { + self.call("pruneblockchain", &[target.into()]) + } + } + }; +} + /// Implements Bitcoin Core JSON-RPC API method `verifytxoutproof` #[macro_export] macro_rules! impl_client_v17__verifytxoutproof { diff --git a/client/src/client_sync/v17/mod.rs b/client/src/client_sync/v17/mod.rs index a19f4e48b..648aac472 100644 --- a/client/src/client_sync/v17/mod.rs +++ b/client/src/client_sync/v17/mod.rs @@ -48,6 +48,7 @@ crate::impl_client_v17__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v18/mod.rs b/client/src/client_sync/v18/mod.rs index 74f3563b4..1e579d61f 100644 --- a/client/src/client_sync/v18/mod.rs +++ b/client/src/client_sync/v18/mod.rs @@ -42,6 +42,7 @@ crate::impl_client_v17__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v19/mod.rs b/client/src/client_sync/v19/mod.rs index d75638ba1..4e7b9bfa3 100644 --- a/client/src/client_sync/v19/mod.rs +++ b/client/src/client_sync/v19/mod.rs @@ -43,6 +43,7 @@ crate::impl_client_v17__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v20.rs b/client/src/client_sync/v20.rs index 633b54cb2..e97bcf0c5 100644 --- a/client/src/client_sync/v20.rs +++ b/client/src/client_sync/v20.rs @@ -40,6 +40,7 @@ crate::impl_client_v17__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v21/mod.rs b/client/src/client_sync/v21/mod.rs index a894202e9..cc8ab23c2 100644 --- a/client/src/client_sync/v21/mod.rs +++ b/client/src/client_sync/v21/mod.rs @@ -42,6 +42,7 @@ crate::impl_client_v17__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v22/mod.rs b/client/src/client_sync/v22/mod.rs index 360287ea5..da71156cd 100644 --- a/client/src/client_sync/v22/mod.rs +++ b/client/src/client_sync/v22/mod.rs @@ -43,6 +43,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v23/mod.rs b/client/src/client_sync/v23/mod.rs index 677727fad..af53cd84d 100644 --- a/client/src/client_sync/v23/mod.rs +++ b/client/src/client_sync/v23/mod.rs @@ -43,6 +43,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v24.rs b/client/src/client_sync/v24.rs index ed4c2667e..cd3bdd462 100644 --- a/client/src/client_sync/v24.rs +++ b/client/src/client_sync/v24.rs @@ -40,6 +40,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v25.rs b/client/src/client_sync/v25.rs index 10229ddc7..62e72d2ae 100644 --- a/client/src/client_sync/v25.rs +++ b/client/src/client_sync/v25.rs @@ -40,6 +40,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v17__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v26/mod.rs b/client/src/client_sync/v26/mod.rs index 180d47926..80d473e7b 100644 --- a/client/src/client_sync/v26/mod.rs +++ b/client/src/client_sync/v26/mod.rs @@ -44,6 +44,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v26__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v27.rs b/client/src/client_sync/v27.rs index 676750fd4..1bdd9162d 100644 --- a/client/src/client_sync/v27.rs +++ b/client/src/client_sync/v27.rs @@ -40,6 +40,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v26__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/client/src/client_sync/v28/mod.rs b/client/src/client_sync/v28/mod.rs index cc6d5add8..600198167 100644 --- a/client/src/client_sync/v28/mod.rs +++ b/client/src/client_sync/v28/mod.rs @@ -42,6 +42,7 @@ crate::impl_client_v22__gettxout!(); crate::impl_client_v17__gettxoutproof!(); crate::impl_client_v26__gettxoutsetinfo!(); crate::impl_client_v17__preciousblock!(); +crate::impl_client_v17__pruneblockchain!(); crate::impl_client_v17__verifytxoutproof!(); // == Control == diff --git a/integration_test/tests/blockchain.rs b/integration_test/tests/blockchain.rs index 28c90bbf1..d245c0616 100644 --- a/integration_test/tests/blockchain.rs +++ b/integration_test/tests/blockchain.rs @@ -261,6 +261,21 @@ fn blockchain__precious_block() { let _ = node.client.precious_block(hash).expect("preciousblock"); } +#[test] +fn blockchain__prune_blockchain() { + const NBLOCKS: usize = 1; + + let node = Node::with_wallet(Wallet::Default, &["-prune=550"]); + let address = node.client.new_address().expect("Failed to get new address"); + + let gen_result = node.client.generate_to_address(NBLOCKS, &address).expect("generate_to_address RPC call failed"); + assert_eq!(gen_result.0.len(), NBLOCKS, "generate_to_address did not return the expected number of block hashes"); + + let target_height: u64 = 500; + + let _: Result = node.client.prune_blockchain(target_height); +} + #[test] fn blockchain__verify_tx_out_proof__modelled() { let node = Node::with_wallet(Wallet::Default, &[]); diff --git a/integration_test/tests/wallet.rs b/integration_test/tests/wallet.rs index 58db4d42c..0c913ee92 100644 --- a/integration_test/tests/wallet.rs +++ b/integration_test/tests/wallet.rs @@ -169,7 +169,6 @@ fn wallet__get_balance__modelled() { json.into_model().unwrap(); } - #[test] #[cfg(all(not(feature = "v17"), not(feature = "v18")))] fn wallet__get_balances() { diff --git a/types/src/v17/blockchain/mod.rs b/types/src/v17/blockchain/mod.rs index c854ceb12..7ac03f657 100644 --- a/types/src/v17/blockchain/mod.rs +++ b/types/src/v17/blockchain/mod.rs @@ -637,6 +637,19 @@ pub struct GetTxOutSetInfo { pub total_amount: f64, } +/// Result of JSON-RPC method `pruneblockchain`. +/// +/// > pruneblockchain height +/// > +/// > Arguments: +/// > 1. "height" (numeric, required) The block height to prune up to. May be set to a discrete height, or a unix timestamp +/// > to prune blocks whose block time is at least 2 hours older than the provided timestamp. +#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] +pub struct PruneBlockchain( + /// The height of the last block pruned. + pub i64, +); + /// Result of JSON-RPC method `verifytxoutproof`. /// /// > verifytxoutproof "proof" diff --git a/types/src/v17/mod.rs b/types/src/v17/mod.rs index cec30adbc..4fcd6435a 100644 --- a/types/src/v17/mod.rs +++ b/types/src/v17/mod.rs @@ -243,7 +243,8 @@ pub use self::{ GetMempoolDescendantsVerbose, GetMempoolEntry, GetMempoolInfo, GetMempoolInfoError, GetRawMempool, GetRawMempoolVerbose, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, MapMempoolEntryError, MempoolEntry, MempoolEntryError, - MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkReject, VerifyTxOutProof, + MempoolEntryFees, MempoolEntryFeesError, PruneBlockchain, Softfork, SoftforkReject, + VerifyTxOutProof, }, control::{GetMemoryInfoStats, Locked, Logging}, generating::{Generate, GenerateToAddress}, diff --git a/types/src/v18/mod.rs b/types/src/v18/mod.rs index 3e1d9bc34..84f041303 100644 --- a/types/src/v18/mod.rs +++ b/types/src/v18/mod.rs @@ -263,10 +263,10 @@ pub use crate::v17::{ ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, LoadWallet, Locked, Logging, MapMempoolEntryError, MempoolAcceptance, MempoolEntry, MempoolEntryError, MempoolEntryFees, - MempoolEntryFeesError, PeerInfo, PsbtInput, PsbtOutput, PsbtScript, RawTransaction, - RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, - SendRawTransaction, SendToAddress, SignFail, SignFailError, SignMessage, SignRawTransaction, - SignRawTransactionError, Softfork, SoftforkReject, TestMempoolAccept, TransactionCategory, - UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, - WalletProcessPsbt, WitnessUtxo, + MempoolEntryFeesError, PeerInfo, PruneBlockchain, PsbtInput, PsbtOutput, PsbtScript, + RawTransaction, RawTransactionError, RawTransactionInput, RawTransactionOutput, + RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignFail, SignFailError, + SignMessage, SignRawTransaction, SignRawTransactionError, Softfork, SoftforkReject, + TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, + WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, }; diff --git a/types/src/v19/mod.rs b/types/src/v19/mod.rs index 32dc9b236..e22b8ce4f 100644 --- a/types/src/v19/mod.rs +++ b/types/src/v19/mod.rs @@ -265,10 +265,11 @@ pub use crate::v17::{ ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, LoadWallet, Locked, Logging, PeerInfo, - RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, - SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, SignRawTransactionError, - SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, - WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, + RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, + SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, + VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, + WitnessUtxo, }; #[doc(inline)] pub use crate::v18::{ diff --git a/types/src/v20/mod.rs b/types/src/v20/mod.rs index bd6944cdd..2330f5135 100644 --- a/types/src/v20/mod.rs +++ b/types/src/v20/mod.rs @@ -257,11 +257,12 @@ pub use crate::{ ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, - ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, RawTransactionError, - RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, - SendToAddress, SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, - TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, - WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, PruneBlockchain, + RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, + SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, + SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, + UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, + WalletProcessPsbt, WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v21/mod.rs b/types/src/v21/mod.rs index 5c36da6e3..9ab7f999f 100644 --- a/types/src/v21/mod.rs +++ b/types/src/v21/mod.rs @@ -263,11 +263,12 @@ pub use crate::{ ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, - ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, RawTransactionError, - RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, - SendToAddress, SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, - TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, - WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, PruneBlockchain, + RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, + SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, + SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, + UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, + WalletProcessPsbt, WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v22/mod.rs b/types/src/v22/mod.rs index 7f394fec3..a475abe5c 100644 --- a/types/src/v22/mod.rs +++ b/types/src/v22/mod.rs @@ -278,7 +278,7 @@ pub use crate::{ ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - LoadWallet, Locked, PeerInfo, RawTransactionError, RawTransactionInput, + LoadWallet, Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, diff --git a/types/src/v23/mod.rs b/types/src/v23/mod.rs index 480b64ce7..97ead9f55 100644 --- a/types/src/v23/mod.rs +++ b/types/src/v23/mod.rs @@ -269,7 +269,7 @@ pub use crate::{ ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - LoadWallet, Locked, PeerInfo, RawTransactionError, RawTransactionInput, + LoadWallet, Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, diff --git a/types/src/v24/mod.rs b/types/src/v24/mod.rs index 32f8ddb0a..c690f7ba6 100644 --- a/types/src/v24/mod.rs +++ b/types/src/v24/mod.rs @@ -274,7 +274,7 @@ pub use crate::{ ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - LoadWallet, Locked, PeerInfo, RawTransactionError, RawTransactionInput, + LoadWallet, Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, diff --git a/types/src/v25/mod.rs b/types/src/v25/mod.rs index fa84d3d8e..62d3594c9 100644 --- a/types/src/v25/mod.rs +++ b/types/src/v25/mod.rs @@ -271,11 +271,11 @@ pub use crate::{ ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - Locked, PeerInfo, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, - SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, - TransactionCategory, UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, + TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, + WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v26/mod.rs b/types/src/v26/mod.rs index 76cb1be8e..731243a30 100644 --- a/types/src/v26/mod.rs +++ b/types/src/v26/mod.rs @@ -291,11 +291,11 @@ pub use crate::{ ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - Locked, PeerInfo, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, - SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, - TransactionCategory, UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, + TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, + WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v27/mod.rs b/types/src/v27/mod.rs index e598b64dd..06069cf11 100644 --- a/types/src/v27/mod.rs +++ b/types/src/v27/mod.rs @@ -275,11 +275,11 @@ pub use crate::{ ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - Locked, PeerInfo, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, - SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, - TransactionCategory, UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, + TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, + WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v28/mod.rs b/types/src/v28/mod.rs index 769952146..5f77ab595 100644 --- a/types/src/v28/mod.rs +++ b/types/src/v28/mod.rs @@ -282,11 +282,11 @@ pub use crate::{ ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - Locked, PeerInfo, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SignMessage, - SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept, - TransactionCategory, UploadTarget, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SignMessage, SignRawTransaction, SignRawTransactionError, SoftforkReject, + TestMempoolAccept, TransactionCategory, UploadTarget, VerifyTxOutProof, + WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/verify/src/method/v17.rs b/verify/src/method/v17.rs index db31b1f71..f753fa5f4 100644 --- a/verify/src/method/v17.rs +++ b/verify/src/method/v17.rs @@ -30,7 +30,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v18.rs b/verify/src/method/v18.rs index 0db8d5179..a90c7751f 100644 --- a/verify/src/method/v18.rs +++ b/verify/src/method/v18.rs @@ -30,7 +30,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v19.rs b/verify/src/method/v19.rs index 7929db457..7b609cfc5 100644 --- a/verify/src/method/v19.rs +++ b/verify/src/method/v19.rs @@ -31,7 +31,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v20.rs b/verify/src/method/v20.rs index f6056a68e..14d77eac0 100644 --- a/verify/src/method/v20.rs +++ b/verify/src/method/v20.rs @@ -31,7 +31,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v21.rs b/verify/src/method/v21.rs index cf1138c67..fc1eedb68 100644 --- a/verify/src/method/v21.rs +++ b/verify/src/method/v21.rs @@ -31,7 +31,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v22.rs b/verify/src/method/v22.rs index 5bc7d235a..ca3071374 100644 --- a/verify/src/method/v22.rs +++ b/verify/src/method/v22.rs @@ -31,7 +31,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v23.rs b/verify/src/method/v23.rs index dfe3e2169..8bec6cd47 100644 --- a/verify/src/method/v23.rs +++ b/verify/src/method/v23.rs @@ -33,7 +33,7 @@ pub const METHODS: &[Method] = &[ Method::new_string("gettxoutproof", "get_tx_out_proof"), Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v24.rs b/verify/src/method/v24.rs index 7708e3d0d..51818cda3 100644 --- a/verify/src/method/v24.rs +++ b/verify/src/method/v24.rs @@ -34,7 +34,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_modelled("gettxspendingprevout", "GetTxSpendingPrevout", "get_tx_spending_prevout"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_bool("verifychain", "verify_chain"), diff --git a/verify/src/method/v25.rs b/verify/src/method/v25.rs index b890c6255..af1fce511 100644 --- a/verify/src/method/v25.rs +++ b/verify/src/method/v25.rs @@ -34,7 +34,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), Method::new_modelled("gettxspendingprevout", "GetTxSpendingPrevout", "get_tx_spending_prevout"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), diff --git a/verify/src/method/v26.rs b/verify/src/method/v26.rs index 9a943caf4..0a80a5801 100644 --- a/verify/src/method/v26.rs +++ b/verify/src/method/v26.rs @@ -38,7 +38,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("importmempool", "ImportMempool", "import_mempool"), Method::new_no_model("loadtxoutset", "LoadTxOutSet", "load_tx_out_set"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), diff --git a/verify/src/method/v27.rs b/verify/src/method/v27.rs index bb6b602c4..2d7861644 100644 --- a/verify/src/method/v27.rs +++ b/verify/src/method/v27.rs @@ -38,7 +38,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("importmempool", "ImportMempool", "import_mempool"), Method::new_no_model("loadtxoutset", "LoadTxOutSet", "load_tx_out_set"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), diff --git a/verify/src/method/v28.rs b/verify/src/method/v28.rs index 9b65b9d2a..d65194bb9 100644 --- a/verify/src/method/v28.rs +++ b/verify/src/method/v28.rs @@ -38,7 +38,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("importmempool", "ImportMempool", "import_mempool"), Method::new_no_model("loadtxoutset", "LoadTxOutSet", "load_tx_out_set"), Method::new_nothing("preciousblock", "precious_block"), - Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_nothing("savemempool", "save_mempool"), Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"),