This repository was archived by the owner on Nov 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 15 files changed +255
-255
lines changed
client/src/client_sync/v17 Expand file tree Collapse file tree 15 files changed +255
-255
lines changed Original file line number Diff line number Diff line change 99//!
1010//! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`.
1111
12- /// Implements bitcoind JSON-RPC API method `getblockchaininfo`
13- #[ macro_export]
14- macro_rules! impl_client_v17__getblockchaininfo {
15- ( ) => {
16- impl Client {
17- pub fn get_blockchain_info( & self ) -> Result <GetBlockchainInfo > {
18- self . call( "getblockchaininfo" , & [ ] )
19- }
20- }
21- } ;
22- }
23-
2412/// Implements bitcoind JSON-RPC API method `getbestblockhash`
2513#[ macro_export]
2614macro_rules! impl_client_v17__getbestblockhash {
@@ -70,6 +58,18 @@ macro_rules! impl_client_v17__getblock {
7058 } ;
7159}
7260
61+ /// Implements bitcoind JSON-RPC API method `getblockchaininfo`
62+ #[ macro_export]
63+ macro_rules! impl_client_v17__getblockchaininfo {
64+ ( ) => {
65+ impl Client {
66+ pub fn get_blockchain_info( & self ) -> Result <GetBlockchainInfo > {
67+ self . call( "getblockchaininfo" , & [ ] )
68+ }
69+ }
70+ } ;
71+ }
72+
7373/// Implements bitcoind JSON-RPC API method `gettxout`
7474#[ macro_export]
7575macro_rules! impl_client_v17__gettxout {
Original file line number Diff line number Diff line change 55//! Specifically this is methods found under the `== Blockchain ==` section of the
66//! API docs of `bitcoind v0.17.1`.
77
8- /// Requires `Client` to be in scope and to implement `get_blockchain_info`.
9- #[ macro_export]
10- macro_rules! impl_test_v17__getblockchaininfo {
11- ( ) => {
12- #[ test]
13- fn get_blockchain_info( ) {
14- let bitcoind = $crate:: bitcoind_no_wallet( ) ;
15- let json = bitcoind. client. get_blockchain_info( ) . expect( "getblockchaininfo" ) ;
16- assert!( json. into_model( ) . is_ok( ) ) ;
17- }
18- } ;
19- }
20-
218/// Requires `Client` to be in scope and to implement `get_best_block_hash`.
229#[ macro_export]
2310macro_rules! impl_test_v17__getbestblockhash {
@@ -81,6 +68,19 @@ macro_rules! impl_test_v17__getblock_verbosity_2 {
8168 } ;
8269}
8370
71+ /// Requires `Client` to be in scope and to implement `get_blockchain_info`.
72+ #[ macro_export]
73+ macro_rules! impl_test_v17__getblockchaininfo {
74+ ( ) => {
75+ #[ test]
76+ fn get_blockchain_info( ) {
77+ let bitcoind = $crate:: bitcoind_no_wallet( ) ;
78+ let json = bitcoind. client. get_blockchain_info( ) . expect( "getblockchaininfo" ) ;
79+ assert!( json. into_model( ) . is_ok( ) ) ;
80+ }
81+ } ;
82+ }
83+
8484/// Requires `Client` to be in scope and to implement `get_tx_out`.
8585#[ macro_export]
8686macro_rules! impl_test_v17__gettxout {
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
88mod blockchain {
99 use super :: * ;
1010
11- impl_test_v17__getblockchaininfo ! ( ) ;
1211 impl_test_v17__getbestblockhash ! ( ) ;
1312 impl_test_v17__getblock_verbosity_0 ! ( ) ;
1413 impl_test_v17__getblock_verbosity_1 ! ( ) ;
14+ impl_test_v17__getblockchaininfo ! ( ) ;
1515}
1616
1717// == Control ==
You can’t perform that action at this time.
0 commit comments