Skip to content

Commit 99751f6

Browse files
committed
Implement listbanned method and test
1 parent f9f907a commit 99751f6

File tree

44 files changed

+185
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+185
-58
lines changed

client/src/client_sync/v17/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ crate::impl_client_v17__get_connection_count!();
7979
crate::impl_client_v17__get_net_totals!();
8080
crate::impl_client_v17__get_network_info!();
8181
crate::impl_client_v17__get_peer_info!();
82+
crate::impl_client_v17__list_banned!();
8283
crate::impl_client_v17__ping!();
8384
crate::impl_client_v17__set_ban!();
8485
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v17/network.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ macro_rules! impl_client_v17__get_peer_info {
119119
};
120120
}
121121

122+
/// Implements Bitcoin Core JSON-RPC API method `listbanned`
123+
#[macro_export]
124+
macro_rules! impl_client_v17__list_banned {
125+
() => {
126+
impl Client {
127+
pub fn list_banned(&self) -> Result<ListBanned> { self.call("listbanned", &[]) }
128+
}
129+
};
130+
}
131+
122132
/// Implements Bitcoin Core JSON-RPC API method `ping`
123133
#[macro_export]
124134
macro_rules! impl_client_v17__ping {

client/src/client_sync/v18/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ crate::impl_client_v17__get_net_totals!();
8888
crate::impl_client_v17__get_network_info!();
8989
crate::impl_client_v18__get_node_addresses!();
9090
crate::impl_client_v17__get_peer_info!();
91+
crate::impl_client_v17__list_banned!();
9192
crate::impl_client_v17__ping!();
9293
crate::impl_client_v17__set_ban!();
9394
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v19/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ crate::impl_client_v17__get_net_totals!();
8383
crate::impl_client_v17__get_network_info!();
8484
crate::impl_client_v18__get_node_addresses!();
8585
crate::impl_client_v17__get_peer_info!();
86+
crate::impl_client_v17__list_banned!();
8687
crate::impl_client_v17__ping!();
8788
crate::impl_client_v17__set_ban!();
8889
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v20/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ crate::impl_client_v17__get_net_totals!();
8080
crate::impl_client_v17__get_network_info!();
8181
crate::impl_client_v18__get_node_addresses!();
8282
crate::impl_client_v17__get_peer_info!();
83+
crate::impl_client_v17__list_banned!();
8384
crate::impl_client_v17__ping!();
8485
crate::impl_client_v17__set_ban!();
8586
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v21/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ crate::impl_client_v17__get_net_totals!();
8282
crate::impl_client_v17__get_network_info!();
8383
crate::impl_client_v18__get_node_addresses!();
8484
crate::impl_client_v17__get_peer_info!();
85+
crate::impl_client_v17__list_banned!();
8586
crate::impl_client_v17__ping!();
8687
crate::impl_client_v17__set_ban!();
8788
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v22/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ crate::impl_client_v17__get_net_totals!();
8282
crate::impl_client_v17__get_network_info!();
8383
crate::impl_client_v18__get_node_addresses!();
8484
crate::impl_client_v17__get_peer_info!();
85+
crate::impl_client_v17__list_banned!();
8586
crate::impl_client_v17__ping!();
8687
crate::impl_client_v17__set_ban!();
8788
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v23/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ crate::impl_client_v17__get_net_totals!();
8484
crate::impl_client_v17__get_network_info!();
8585
crate::impl_client_v18__get_node_addresses!();
8686
crate::impl_client_v17__get_peer_info!();
87+
crate::impl_client_v17__list_banned!();
8788
crate::impl_client_v17__ping!();
8889
crate::impl_client_v17__set_ban!();
8990
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v24/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ crate::impl_client_v17__get_net_totals!();
8181
crate::impl_client_v17__get_network_info!();
8282
crate::impl_client_v18__get_node_addresses!();
8383
crate::impl_client_v17__get_peer_info!();
84+
crate::impl_client_v17__list_banned!();
8485
crate::impl_client_v17__ping!();
8586
crate::impl_client_v17__set_ban!();
8687
crate::impl_client_v17__set_network_active!();

client/src/client_sync/v25/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ crate::impl_client_v17__get_net_totals!();
8181
crate::impl_client_v17__get_network_info!();
8282
crate::impl_client_v18__get_node_addresses!();
8383
crate::impl_client_v17__get_peer_info!();
84+
crate::impl_client_v17__list_banned!();
8485
crate::impl_client_v17__ping!();
8586
crate::impl_client_v17__set_ban!();
8687
crate::impl_client_v17__set_network_active!();

0 commit comments

Comments
 (0)