diff --git a/client/src/client_sync/v17/mod.rs b/client/src/client_sync/v17/mod.rs index 8aadc0b5..f7f6cff6 100644 --- a/client/src/client_sync/v17/mod.rs +++ b/client/src/client_sync/v17/mod.rs @@ -79,6 +79,7 @@ crate::impl_client_v17__get_connection_count!(); crate::impl_client_v17__get_net_totals!(); crate::impl_client_v17__get_network_info!(); 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!(); diff --git a/client/src/client_sync/v17/network.rs b/client/src/client_sync/v17/network.rs index 3c5aaf70..920d8c51 100644 --- a/client/src/client_sync/v17/network.rs +++ b/client/src/client_sync/v17/network.rs @@ -119,6 +119,16 @@ macro_rules! impl_client_v17__get_peer_info { }; } +/// Implements Bitcoin Core JSON-RPC API method `listbanned` +#[macro_export] +macro_rules! impl_client_v17__list_banned { + () => { + impl Client { + pub fn list_banned(&self) -> Result { self.call("listbanned", &[]) } + } + }; +} + /// Implements Bitcoin Core JSON-RPC API method `ping` #[macro_export] macro_rules! impl_client_v17__ping { diff --git a/client/src/client_sync/v18/mod.rs b/client/src/client_sync/v18/mod.rs index 1ddaa8ca..3776250f 100644 --- a/client/src/client_sync/v18/mod.rs +++ b/client/src/client_sync/v18/mod.rs @@ -88,6 +88,7 @@ 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!(); diff --git a/client/src/client_sync/v19/mod.rs b/client/src/client_sync/v19/mod.rs index 0e37609a..74c1c1e4 100644 --- a/client/src/client_sync/v19/mod.rs +++ b/client/src/client_sync/v19/mod.rs @@ -83,6 +83,7 @@ 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!(); diff --git a/client/src/client_sync/v20/mod.rs b/client/src/client_sync/v20/mod.rs index cf564272..a86ee2c0 100644 --- a/client/src/client_sync/v20/mod.rs +++ b/client/src/client_sync/v20/mod.rs @@ -80,6 +80,7 @@ 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!(); diff --git a/client/src/client_sync/v21/mod.rs b/client/src/client_sync/v21/mod.rs index 88646fc5..5d60b8a7 100644 --- a/client/src/client_sync/v21/mod.rs +++ b/client/src/client_sync/v21/mod.rs @@ -82,6 +82,7 @@ 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!(); diff --git a/client/src/client_sync/v22/mod.rs b/client/src/client_sync/v22/mod.rs index 08c45137..8900c456 100644 --- a/client/src/client_sync/v22/mod.rs +++ b/client/src/client_sync/v22/mod.rs @@ -82,6 +82,7 @@ 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!(); diff --git a/client/src/client_sync/v23/mod.rs b/client/src/client_sync/v23/mod.rs index 60878578..7641f077 100644 --- a/client/src/client_sync/v23/mod.rs +++ b/client/src/client_sync/v23/mod.rs @@ -84,6 +84,7 @@ 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!(); diff --git a/client/src/client_sync/v24/mod.rs b/client/src/client_sync/v24/mod.rs index cadd1d06..d26039ef 100644 --- a/client/src/client_sync/v24/mod.rs +++ b/client/src/client_sync/v24/mod.rs @@ -81,6 +81,7 @@ 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!(); diff --git a/client/src/client_sync/v25/mod.rs b/client/src/client_sync/v25/mod.rs index 15eff3bc..327cab4e 100644 --- a/client/src/client_sync/v25/mod.rs +++ b/client/src/client_sync/v25/mod.rs @@ -81,6 +81,7 @@ 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!(); diff --git a/client/src/client_sync/v26/mod.rs b/client/src/client_sync/v26/mod.rs index 4d68c2ba..10e6bdea 100644 --- a/client/src/client_sync/v26/mod.rs +++ b/client/src/client_sync/v26/mod.rs @@ -86,6 +86,7 @@ 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!(); diff --git a/client/src/client_sync/v27/mod.rs b/client/src/client_sync/v27/mod.rs index cb9e8a81..8526ffea 100644 --- a/client/src/client_sync/v27/mod.rs +++ b/client/src/client_sync/v27/mod.rs @@ -82,6 +82,7 @@ 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!(); diff --git a/client/src/client_sync/v28/mod.rs b/client/src/client_sync/v28/mod.rs index fbc00e92..4e2a68ee 100644 --- a/client/src/client_sync/v28/mod.rs +++ b/client/src/client_sync/v28/mod.rs @@ -84,6 +84,7 @@ 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!(); diff --git a/client/src/client_sync/v29/mod.rs b/client/src/client_sync/v29/mod.rs index ed9fcffc..06d15e74 100644 --- a/client/src/client_sync/v29/mod.rs +++ b/client/src/client_sync/v29/mod.rs @@ -84,6 +84,7 @@ 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!(); diff --git a/integration_test/tests/network.rs b/integration_test/tests/network.rs index 2c273e79..3b428011 100644 --- a/integration_test/tests/network.rs +++ b/integration_test/tests/network.rs @@ -113,6 +113,20 @@ fn get_peer_info_three_node_network() { assert!(node3.peers_connected() >= 1); } +#[test] +fn network__list_banned() { + let node = Node::with_wallet(Wallet::None, &[]); + let dummy_subnet = "192.0.2.5/32"; + + node.client.set_ban(dummy_subnet, SetBanCommand::Add).expect("setban add"); + let json: ListBanned = node.client.list_banned().expect("listbanned"); + assert!(json.0.iter().any(|item| item.address == dummy_subnet)); + + node.client.set_ban(dummy_subnet, SetBanCommand::Remove).expect("setban remove"); + let json: ListBanned = node.client.list_banned().expect("listbanned"); + assert!(json.0.iter().all(|item| item.address != dummy_subnet)); +} + #[test] fn network__ping() { let node = Node::with_wallet(Wallet::None, &[]); diff --git a/types/src/v17/mod.rs b/types/src/v17/mod.rs index eae0b0ed..738b16e4 100644 --- a/types/src/v17/mod.rs +++ b/types/src/v17/mod.rs @@ -102,7 +102,7 @@ //! | getnettotals | version | | //! | getnetworkinfo | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | diff --git a/types/src/v17/network/mod.rs b/types/src/v17/network/mod.rs index 5d799042..41f6c862 100644 --- a/types/src/v17/network/mod.rs +++ b/types/src/v17/network/mod.rs @@ -263,7 +263,17 @@ pub struct ListBanned(pub Vec); /// An item from the list returned by the JSON-RPC method `listbanned` #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -pub struct Banned(String); // FIXME: The docs are empty so I don't know what shape this is. +pub struct Banned { + // NOTE: Shape taken from Core source code,as method is undocumented in the Bitcoin RPC CLI for version 17 to 20. + /// The IP/Subnet of the banned node. + pub address: String, + /// The UNIX epoch time the ban was expires. + pub banned_until: u32, + /// The UNIX epoch time the ban was created. + pub ban_created: u32, + /// The reason for the ban. + pub ban_reason: String, +} /// Result of JSON-RPC method `setnetworkactive`. /// diff --git a/types/src/v18/mod.rs b/types/src/v18/mod.rs index a8f02bdc..6b9e62d5 100644 --- a/types/src/v18/mod.rs +++ b/types/src/v18/mod.rs @@ -105,7 +105,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | diff --git a/types/src/v19/mod.rs b/types/src/v19/mod.rs index 4f52fd46..3fc694f1 100644 --- a/types/src/v19/mod.rs +++ b/types/src/v19/mod.rs @@ -105,7 +105,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | diff --git a/types/src/v20/mod.rs b/types/src/v20/mod.rs index d6cf9c27..84381c67 100644 --- a/types/src/v20/mod.rs +++ b/types/src/v20/mod.rs @@ -106,7 +106,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -227,18 +227,22 @@ // JSON-RPC types by API section. mod control; +mod network; #[doc(inline)] -pub use self::control::Logging; +pub use self::{ + control::Logging, + network::{Banned, ListBanned}, +}; #[doc(inline)] pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, CreateWallet, DecodePsbt, - DecodePsbtError, DecodeRawTransaction, DecodeScript, DecodeScriptError, DumpPrivKey, - DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, CreateWallet, DecodePsbt, DecodePsbtError, + DecodeRawTransaction, DecodeScript, DecodeScriptError, DumpPrivKey, DumpWallet, + EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, @@ -253,18 +257,18 @@ pub use crate::{ GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, - ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListBanned, - ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, - ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, - ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, - ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, - ListTransactionsItemError, ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, - PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SetNetworkActive, - SignMessage, SignMessageWithPrivKey, SignRawTransaction, SignRawTransactionError, - SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, ValidateAddress, - ValidateAddressError, VerifyChain, VerifyMessage, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, + ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, + ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, + ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, + ListTransactionsItem, ListTransactionsItemError, ListUnspentItemError, ListWallets, + LoadWallet, Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SetNetworkActive, SignMessage, SignMessageWithPrivKey, SignRawTransaction, + SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, + UploadTarget, ValidateAddress, ValidateAddressError, VerifyChain, VerifyMessage, + VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, + WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v20/network.rs b/types/src/v20/network.rs new file mode 100644 index 00000000..d6e07306 --- /dev/null +++ b/types/src/v20/network.rs @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: CC0-1.0 + +//! The JSON-RPC API for Bitcoin Core `v0.20.2` - network. +//! +//! Types for methods found under the `== Network ==` section of the API docs. + +use serde::{Deserialize, Serialize}; + +/// Result of JSON-RPC method `listbanned`. +/// +/// > listbanned +/// +/// > List all banned IPs/Subnets. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct ListBanned(pub Vec); + +/// An item from the list returned by the JSON-RPC method `listbanned` +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct Banned { + /// The IP/Subnet of the banned node. + pub address: String, + /// The UNIX epoch time the ban was expires. + pub banned_until: u32, + /// The UNIX epoch time the ban was created. + pub ban_created: u32, +} diff --git a/types/src/v21/mod.rs b/types/src/v21/mod.rs index 8b6949b5..daaa11bd 100644 --- a/types/src/v21/mod.rs +++ b/types/src/v21/mod.rs @@ -107,7 +107,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -240,11 +240,11 @@ pub use self::wallet::UnloadWallet; pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, CreateWallet, DecodePsbt, - DecodePsbtError, DecodeRawTransaction, DecodeScript, DecodeScriptError, DumpPrivKey, - DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, CreateWallet, DecodePsbt, DecodePsbtError, + DecodeRawTransaction, DecodeScript, DecodeScriptError, DumpPrivKey, DumpWallet, + EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, @@ -259,18 +259,18 @@ pub use crate::{ GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, - ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListBanned, - ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, - ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, - ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, - ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, - ListTransactionsItemError, ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, - PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SetNetworkActive, - SignMessage, SignMessageWithPrivKey, SignRawTransaction, SignRawTransactionError, - SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, ValidateAddress, - ValidateAddressError, VerifyChain, VerifyMessage, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, + ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, + ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, + ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, + ListTransactionsItem, ListTransactionsItemError, ListUnspentItemError, ListWallets, + LoadWallet, Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SetNetworkActive, SignMessage, SignMessageWithPrivKey, SignRawTransaction, + SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, + UploadTarget, ValidateAddress, ValidateAddressError, VerifyChain, VerifyMessage, + VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, + WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, @@ -286,5 +286,5 @@ pub use crate::{ MempoolEntry, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkType, }, - v20::Logging, + v20::{Banned, ListBanned, Logging}, }; diff --git a/types/src/v22/mod.rs b/types/src/v22/mod.rs index fbe02a7b..d060df19 100644 --- a/types/src/v22/mod.rs +++ b/types/src/v22/mod.rs @@ -107,7 +107,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -244,18 +244,22 @@ // JSON-RPC types by API section. mod control; +mod network; #[doc(inline)] -pub use self::control::Logging; +pub use self::{ + control::Logging, + network::{Banned, ListBanned}, +}; #[doc(inline)] pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, CreateWallet, DecodePsbt, - DecodePsbtError, DecodeRawTransaction, DecodeScript, DecodeScriptError, DumpPrivKey, - DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, CreateWallet, DecodePsbt, DecodePsbtError, + DecodeRawTransaction, DecodeScript, DecodeScriptError, DumpPrivKey, DumpWallet, + EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, @@ -270,18 +274,18 @@ pub use crate::{ GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, - ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListBanned, - ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, - ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, - ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, - ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, - ListTransactionsItemError, ListUnspentItemError, ListWallets, LoadWallet, Locked, PeerInfo, - PruneBlockchain, RawTransactionError, RawTransactionInput, RawTransactionOutput, - RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, SetNetworkActive, - SignMessage, SignMessageWithPrivKey, SignRawTransaction, SignRawTransactionError, - SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, ValidateAddress, - ValidateAddressError, VerifyChain, VerifyMessage, VerifyTxOutProof, WalletCreateFundedPsbt, - WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo, + ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, + ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, + ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, + ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, + ListTransactionsItem, ListTransactionsItemError, ListUnspentItemError, ListWallets, + LoadWallet, Locked, PeerInfo, PruneBlockchain, RawTransactionError, RawTransactionInput, + RawTransactionOutput, RescanBlockchain, SendMany, SendRawTransaction, SendToAddress, + SetNetworkActive, SignMessage, SignMessageWithPrivKey, SignRawTransaction, + SignRawTransactionError, SoftforkReject, TestMempoolAccept, TransactionCategory, + UploadTarget, ValidateAddress, ValidateAddressError, VerifyChain, VerifyMessage, + VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, + WitnessUtxo, }, v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, diff --git a/types/src/v22/network.rs b/types/src/v22/network.rs new file mode 100644 index 00000000..b21032d8 --- /dev/null +++ b/types/src/v22/network.rs @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: CC0-1.0 + +//! The JSON-RPC API for Bitcoin Core `v22` - network. +//! +//! Types for methods found under the `== Network ==` section of the API docs. + +use serde::{Deserialize, Serialize}; + +/// Result of JSON-RPC method `listbanned`. +/// +/// > listbanned +/// +/// > List all banned IPs/Subnets. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct ListBanned(pub Vec); + +/// An item from the list returned by the JSON-RPC method `listbanned` +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct Banned { + /// The IP/Subnet of the banned node. + pub address: String, + /// The UNIX epoch time the ban was created. + pub ban_created: u32, + /// The UNIX epoch time the ban was expires. + pub banned_until: u32, + /// The ban duration, in seconds. + pub ban_duration: u32, + /// The time remaining until the ban expires, in seconds. + pub time_remaining: u32, +} diff --git a/types/src/v23/mod.rs b/types/src/v23/mod.rs index 3a156c75..ed2fe29b 100644 --- a/types/src/v23/mod.rs +++ b/types/src/v23/mod.rs @@ -98,7 +98,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -250,10 +250,10 @@ pub use self::{ pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, CreateWallet, DecodeRawTransaction, - DecodeScript, DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, CreateWallet, DecodeRawTransaction, DecodeScript, + DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, @@ -269,8 +269,8 @@ pub use crate::{ GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, - ListAddressGroupingsError, ListAddressGroupingsItem, ListBanned, ListLabels, - ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, + ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, ListLockUnspent, + ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspentItemError, ListWallets, @@ -297,5 +297,5 @@ pub use crate::{ SoftforkType, }, v21::UnloadWallet, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, }; diff --git a/types/src/v24/mod.rs b/types/src/v24/mod.rs index 87899891..1969e6e6 100644 --- a/types/src/v24/mod.rs +++ b/types/src/v24/mod.rs @@ -99,7 +99,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -251,10 +251,10 @@ pub use self::raw_transactions::{ pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, CreateWallet, DecodeRawTransaction, - DecodeScript, DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, CreateWallet, DecodeRawTransaction, DecodeScript, + DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, @@ -270,8 +270,8 @@ pub use crate::{ GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, - ListAddressGroupingsError, ListAddressGroupingsItem, ListBanned, ListLabels, - ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, + ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, ListLockUnspent, + ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, ListTransactionsItemError, ListUnspentItemError, ListWallets, @@ -298,6 +298,6 @@ pub use crate::{ SoftforkType, }, v21::UnloadWallet, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, v23::SaveMempool, }; diff --git a/types/src/v25/mod.rs b/types/src/v25/mod.rs index 9386389a..0cef1a81 100644 --- a/types/src/v25/mod.rs +++ b/types/src/v25/mod.rs @@ -100,7 +100,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -248,26 +248,25 @@ pub use self::wallet::{CreateWallet, LoadWallet, UnloadWallet}; pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, - DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, - FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, - GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, - GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, - GetBalance, GetBestBlockHash, GetBlockCount, GetBlockHash, GetBlockHeader, - GetBlockHeaderError, GetBlockHeaderVerbose, GetBlockHeaderVerboseError, GetBlockStats, - GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError, GetBlockVerboseOne, - GetBlockVerboseOneError, GetBlockVerboseZero, GetChainTips, GetChainTxStats, - GetChainTxStatsError, GetConnectionCount, GetDifficulty, GetMemoryInfoStats, - GetMempoolInfo, GetMempoolInfoError, GetMiningInfo, GetNetTotals, GetNetworkInfo, - GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, - GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, GetRawTransaction, - GetRawTransactionVerbose, GetRawTransactionVerboseError, GetReceivedByAddress, - GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, - GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, GetUnconfirmedBalance, - GetWalletInfo, GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, - ListAddressGroupingsError, ListAddressGroupingsItem, ListBanned, ListLabels, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, DecodeScriptError, + DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, + FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, + GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, + GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, + GetBlockHash, GetBlockHeader, GetBlockHeaderError, GetBlockHeaderVerbose, + GetBlockHeaderVerboseError, GetBlockStats, GetBlockStatsError, GetBlockTemplate, + GetBlockTemplateError, GetBlockVerboseOne, GetBlockVerboseOneError, GetBlockVerboseZero, + GetChainTips, GetChainTxStats, GetChainTxStatsError, GetConnectionCount, GetDifficulty, + GetMemoryInfoStats, GetMempoolInfo, GetMempoolInfoError, GetMiningInfo, GetNetTotals, + GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, + GetNewAddress, GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, + GetRawTransaction, GetRawTransactionVerbose, GetRawTransactionVerboseError, + GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, + GetTransactionError, GetTxOut, GetTxOutError, GetTxOutSetInfo, GetTxOutSetInfoError, + GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, + ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, @@ -293,7 +292,7 @@ pub use crate::{ MempoolEntry, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkType, }, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, v23::SaveMempool, v24::{ DecodePsbt, DecodePsbtError, GlobalXpub, Proprietary, PsbtInput, PsbtOutput, diff --git a/types/src/v26/mod.rs b/types/src/v26/mod.rs index 1bb8121e..78eec6ce 100644 --- a/types/src/v26/mod.rs +++ b/types/src/v26/mod.rs @@ -106,7 +106,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -268,26 +268,25 @@ pub use self::{ pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, - DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, - FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, - GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, - GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, - GetBalance, GetBestBlockHash, GetBlockCount, GetBlockHash, GetBlockHeader, - GetBlockHeaderError, GetBlockHeaderVerbose, GetBlockHeaderVerboseError, GetBlockStats, - GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError, GetBlockVerboseOne, - GetBlockVerboseOneError, GetBlockVerboseZero, GetChainTips, GetChainTxStats, - GetChainTxStatsError, GetConnectionCount, GetDifficulty, GetMemoryInfoStats, - GetMempoolInfo, GetMempoolInfoError, GetMiningInfo, GetNetTotals, GetNetworkInfo, - GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, - GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, GetRawTransaction, - GetRawTransactionVerbose, GetRawTransactionVerboseError, GetReceivedByAddress, - GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, - GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, - GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, - ListAddressGroupingsItem, ListBanned, ListLabels, ListLockUnspent, ListLockUnspentItem, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, DecodeScriptError, + DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, + FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, + GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, + GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, + GetBlockHash, GetBlockHeader, GetBlockHeaderError, GetBlockHeaderVerbose, + GetBlockHeaderVerboseError, GetBlockStats, GetBlockStatsError, GetBlockTemplate, + GetBlockTemplateError, GetBlockVerboseOne, GetBlockVerboseOneError, GetBlockVerboseZero, + GetChainTips, GetChainTxStats, GetChainTxStatsError, GetConnectionCount, GetDifficulty, + GetMemoryInfoStats, GetMempoolInfo, GetMempoolInfoError, GetMiningInfo, GetNetTotals, + GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, + GetNewAddress, GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, + GetRawTransaction, GetRawTransactionVerbose, GetRawTransactionVerboseError, + GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, + GetTransactionError, GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, + GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, + ListAddressGroupingsItem, ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, @@ -313,7 +312,7 @@ pub use crate::{ MempoolEntry, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkType, }, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, v23::SaveMempool, v24::{ DecodePsbt, DecodePsbtError, GlobalXpub, Proprietary, PsbtInput, PsbtOutput, diff --git a/types/src/v27/mod.rs b/types/src/v27/mod.rs index 2728d182..ea4314cb 100644 --- a/types/src/v27/mod.rs +++ b/types/src/v27/mod.rs @@ -106,7 +106,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | TODO | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -252,26 +252,25 @@ pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, - DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, - FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, - GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, - GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, - GetBalance, GetBestBlockHash, GetBlockCount, GetBlockHash, GetBlockHeader, - GetBlockHeaderError, GetBlockHeaderVerbose, GetBlockHeaderVerboseError, GetBlockStats, - GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError, GetBlockVerboseOne, - GetBlockVerboseOneError, GetBlockVerboseZero, GetChainTips, GetChainTxStats, - GetChainTxStatsError, GetConnectionCount, GetDifficulty, GetMemoryInfoStats, - GetMempoolInfo, GetMempoolInfoError, GetMiningInfo, GetNetTotals, GetNetworkInfo, - GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, - GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, GetRawTransaction, - GetRawTransactionVerbose, GetRawTransactionVerboseError, GetReceivedByAddress, - GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, - GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, - GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, - ListAddressGroupingsItem, ListBanned, ListLabels, ListLockUnspent, ListLockUnspentItem, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, DecodeScriptError, + DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, + FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, + GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, + GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, + GetBlockHash, GetBlockHeader, GetBlockHeaderError, GetBlockHeaderVerbose, + GetBlockHeaderVerboseError, GetBlockStats, GetBlockStatsError, GetBlockTemplate, + GetBlockTemplateError, GetBlockVerboseOne, GetBlockVerboseOneError, GetBlockVerboseZero, + GetChainTips, GetChainTxStats, GetChainTxStatsError, GetConnectionCount, GetDifficulty, + GetMemoryInfoStats, GetMempoolInfo, GetMempoolInfoError, GetMiningInfo, GetNetTotals, + GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, + GetNewAddress, GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, + GetRawTransaction, GetRawTransactionVerbose, GetRawTransactionVerboseError, + GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, + GetTransactionError, GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, + GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, + ListAddressGroupingsItem, ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, @@ -297,7 +296,7 @@ pub use crate::{ MempoolEntry, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkType, }, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, v23::SaveMempool, v24::{ DecodePsbt, DecodePsbtError, GlobalXpub, Proprietary, PsbtInput, PsbtOutput, diff --git a/types/src/v28/mod.rs b/types/src/v28/mod.rs index 814f71e6..ed99c0fb 100644 --- a/types/src/v28/mod.rs +++ b/types/src/v28/mod.rs @@ -106,7 +106,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -260,26 +260,25 @@ pub use self::{blockchain::GetBlockchainInfo, mining::GetMiningInfo, network::Ge pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, - DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, - FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, - GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, - GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, - GetBalance, GetBestBlockHash, GetBlockCount, GetBlockHash, GetBlockHeader, - GetBlockHeaderError, GetBlockHeaderVerbose, GetBlockHeaderVerboseError, GetBlockStats, - GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError, GetBlockVerboseOne, - GetBlockVerboseOneError, GetBlockVerboseZero, GetChainTips, GetChainTxStats, - GetChainTxStatsError, GetConnectionCount, GetDifficulty, GetMemoryInfoStats, - GetMempoolInfo, GetMempoolInfoError, GetNetTotals, GetNetworkInfoAddress, - GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, GetPeerInfo, - GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, GetRawTransaction, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, DecodeScriptError, + DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, + FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, + GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, + GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, + GetBlockHash, GetBlockHeader, GetBlockHeaderError, GetBlockHeaderVerbose, + GetBlockHeaderVerboseError, GetBlockStats, GetBlockStatsError, GetBlockTemplate, + GetBlockTemplateError, GetBlockVerboseOne, GetBlockVerboseOneError, GetBlockVerboseZero, + GetChainTips, GetChainTxStats, GetChainTxStatsError, GetConnectionCount, GetDifficulty, + GetMemoryInfoStats, GetMempoolInfo, GetMempoolInfoError, GetNetTotals, + GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, + GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, GetRawTransaction, GetRawTransactionVerbose, GetRawTransactionVerboseError, GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, - ListAddressGroupingsItem, ListBanned, ListLabels, ListLockUnspent, ListLockUnspentItem, + ListAddressGroupingsItem, ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, @@ -304,7 +303,7 @@ pub use crate::{ GetMempoolDescendantsVerbose, GetMempoolEntry, MapMempoolEntryError, MempoolEntry, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkType, }, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, v23::SaveMempool, v24::{ DecodePsbt, DecodePsbtError, GlobalXpub, Proprietary, PsbtInput, PsbtOutput, diff --git a/types/src/v29/mod.rs b/types/src/v29/mod.rs index 80531d03..58246b26 100644 --- a/types/src/v29/mod.rs +++ b/types/src/v29/mod.rs @@ -107,7 +107,7 @@ //! | getnetworkinfo | version + model | | //! | getnodeaddresses | version + model | | //! | getpeerinfo | version | | -//! | listbanned | returns string | | +//! | listbanned | version | | //! | ping | returns nothing | | //! | setban | returns nothing | | //! | setnetworkactive | version | | @@ -275,24 +275,23 @@ pub use self::{ pub use crate::{ v17::{ AbortRescan, AddMultisigAddress, AddMultisigAddressError, AddedNode, AddedNodeAddress, - AddressInformation, Banned, BumpFee, BumpFeeError, ChainTips, ChainTipsError, - ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, - CreateMultisigError, CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, - DecodeScriptError, DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, - FinalizePsbtError, FundRawTransaction, FundRawTransactionError, Generate, - GenerateToAddress, GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, - GetAddressInfoEmbeddedError, GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, - GetBalance, GetBestBlockHash, GetBlockCount, GetBlockHash, GetBlockStats, - GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError, GetBlockVerboseZero, - GetChainTips, GetChainTxStats, GetChainTxStatsError, GetConnectionCount, GetDifficulty, - GetMemoryInfoStats, GetMempoolInfo, GetMempoolInfoError, GetNetTotals, - GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, - GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, GetRawTransaction, - GetRawTransactionVerbose, GetRawTransactionVerboseError, GetReceivedByAddress, - GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, - GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, GetWalletInfoError, - GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, - ListAddressGroupingsItem, ListBanned, ListLabels, ListLockUnspent, ListLockUnspentItem, + AddressInformation, BumpFee, BumpFeeError, ChainTips, ChainTipsError, ChainTipsStatus, + CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisig, CreateMultisigError, + CreatePsbt, CreateRawTransaction, DecodeRawTransaction, DecodeScript, DecodeScriptError, + DumpPrivKey, DumpWallet, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, + FundRawTransaction, FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo, + GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoEmbeddedError, GetAddressInfoError, + GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, + GetBlockHash, GetBlockStats, GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError, + GetBlockVerboseZero, GetChainTips, GetChainTxStats, GetChainTxStatsError, + GetConnectionCount, GetDifficulty, GetMemoryInfoStats, GetMempoolInfo, GetMempoolInfoError, + GetNetTotals, GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, + GetNewAddress, GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, + GetRawTransaction, GetRawTransactionVerbose, GetRawTransactionVerboseError, + GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, + GetTransactionError, GetTxOut, GetTxOutError, GetUnconfirmedBalance, GetWalletInfo, + GetWalletInfoError, GetZmqNotifications, ListAddressGroupings, ListAddressGroupingsError, + ListAddressGroupingsItem, ListLabels, ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, @@ -317,7 +316,7 @@ pub use crate::{ GetMempoolEntry, MapMempoolEntryError, MempoolEntry, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError, Softfork, SoftforkType, }, - v22::{Logging, ScriptPubkey}, + v22::{Banned, ListBanned, Logging, ScriptPubkey}, v23::SaveMempool, v24::{ DecodePsbt, DecodePsbtError, GlobalXpub, Proprietary, PsbtInput, PsbtOutput, diff --git a/verify/src/method/v17.rs b/verify/src/method/v17.rs index 77bb3c6f..4ccdc3d6 100644 --- a/verify/src/method/v17.rs +++ b/verify/src/method/v17.rs @@ -59,7 +59,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("getnettotals", "GetNetTotals", "get_net_totals"), Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v18.rs b/verify/src/method/v18.rs index 1516b9b8..d7922b93 100644 --- a/verify/src/method/v18.rs +++ b/verify/src/method/v18.rs @@ -62,7 +62,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v19.rs b/verify/src/method/v19.rs index b46a31dd..f10fd9fc 100644 --- a/verify/src/method/v19.rs +++ b/verify/src/method/v19.rs @@ -62,7 +62,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v20.rs b/verify/src/method/v20.rs index 99e4f07f..c25dbfbe 100644 --- a/verify/src/method/v20.rs +++ b/verify/src/method/v20.rs @@ -63,7 +63,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v21.rs b/verify/src/method/v21.rs index c377c272..840b8305 100644 --- a/verify/src/method/v21.rs +++ b/verify/src/method/v21.rs @@ -64,7 +64,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v22.rs b/verify/src/method/v22.rs index 22d3466f..bcde9f77 100644 --- a/verify/src/method/v22.rs +++ b/verify/src/method/v22.rs @@ -64,7 +64,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v23.rs b/verify/src/method/v23.rs index 49a3bfee..9c3cbd5f 100644 --- a/verify/src/method/v23.rs +++ b/verify/src/method/v23.rs @@ -62,7 +62,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v24.rs b/verify/src/method/v24.rs index 9d87ed2d..22bd7805 100644 --- a/verify/src/method/v24.rs +++ b/verify/src/method/v24.rs @@ -63,7 +63,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v25.rs b/verify/src/method/v25.rs index 4c0c8519..22cd48ec 100644 --- a/verify/src/method/v25.rs +++ b/verify/src/method/v25.rs @@ -64,7 +64,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v26.rs b/verify/src/method/v26.rs index 09a30aa4..86de174a 100644 --- a/verify/src/method/v26.rs +++ b/verify/src/method/v26.rs @@ -70,7 +70,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v27.rs b/verify/src/method/v27.rs index 03a7a2ca..1b7b374f 100644 --- a/verify/src/method/v27.rs +++ b/verify/src/method/v27.rs @@ -72,7 +72,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v28.rs b/verify/src/method/v28.rs index ba90a572..4a3ece6d 100644 --- a/verify/src/method/v28.rs +++ b/verify/src/method/v28.rs @@ -72,7 +72,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"), diff --git a/verify/src/method/v29.rs b/verify/src/method/v29.rs index 90c61ad4..4eb5ccd2 100644 --- a/verify/src/method/v29.rs +++ b/verify/src/method/v29.rs @@ -73,7 +73,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), Method::new_modelled("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), - Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_no_model("listbanned", "ListBanned", "list_banned"), Method::new_nothing("ping", "ping"), Method::new_nothing("setban", "set_ban"), Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"),