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 9
9
//!
10
10
//! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`.
11
11
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
-
24
12
/// Implements bitcoind JSON-RPC API method `getbestblockhash`
25
13
#[ macro_export]
26
14
macro_rules! impl_client_v17__getbestblockhash {
@@ -70,6 +58,18 @@ macro_rules! impl_client_v17__getblock {
70
58
} ;
71
59
}
72
60
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
+
73
73
/// Implements bitcoind JSON-RPC API method `gettxout`
74
74
#[ macro_export]
75
75
macro_rules! impl_client_v17__gettxout {
Original file line number Diff line number Diff line change 5
5
//! Specifically this is methods found under the `== Blockchain ==` section of the
6
6
//! API docs of `bitcoind v0.17.1`.
7
7
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
-
21
8
/// Requires `Client` to be in scope and to implement `get_best_block_hash`.
22
9
#[ macro_export]
23
10
macro_rules! impl_test_v17__getbestblockhash {
@@ -81,6 +68,19 @@ macro_rules! impl_test_v17__getblock_verbosity_2 {
81
68
} ;
82
69
}
83
70
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
+
84
84
/// Requires `Client` to be in scope and to implement `get_tx_out`.
85
85
#[ macro_export]
86
86
macro_rules! impl_test_v17__gettxout {
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ use integration_test::*;
8
8
mod blockchain {
9
9
use super :: * ;
10
10
11
- impl_test_v17__getblockchaininfo ! ( ) ;
12
11
impl_test_v17__getbestblockhash ! ( ) ;
13
12
impl_test_v17__getblock_verbosity_0 ! ( ) ;
14
13
impl_test_v17__getblock_verbosity_1 ! ( ) ;
14
+ impl_test_v17__getblockchaininfo ! ( ) ;
15
15
}
16
16
17
17
// == Control ==
You can’t perform that action at this time.
0 commit comments