Skip to content

Commit a1e4ee1

Browse files
committed
Add verify tool
Add a tool to help verify that what we have done is correct. Adds crate that when run produces: ```bash Verifying support for Bitcoin Core v17 Checking he documented methods are correct for this version of Core ... ✓ The documented status is correct ... ✓ ``` Run the tool for v17 module and fix the few mistakes it found - WIN! Then fix up the docs in v18 and run the tool to verify the v18 stuff is correct.
1 parent b9ab932 commit a1e4ee1

File tree

15 files changed

+1262
-177
lines changed

15 files changed

+1262
-177
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["client", "types", "jsonrpc"]
2+
members = ["client", "types", "jsonrpc", "verify"]
33
exclude = ["integration_test", "node"]
44
resolver = "2"
55

integration_test/tests/blockchain.rs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,25 @@ fn get_block_header_verbose() { // verbose = true
7676
// optional as suggested in the docs but to no avail.
7777
#[test]
7878
#[cfg(feature = "0_17_1")]
79+
fn get_block_stats() {
80+
get_block_stats_by_height();
81+
get_block_stats_by_hash();
82+
}
83+
7984
fn get_block_stats_by_height() {
8085
let node = Node::new_no_wallet();
8186
let json = node.client.get_block_stats_by_height(0).expect("getblockstats");
8287
assert!(json.into_model().is_ok());
8388
}
8489

85-
// FIXME: Same as get_block_stats_by_height above.
86-
#[test]
87-
#[cfg(feature = "0_17_1")]
8890
fn get_block_stats_by_hash() { // verbose = true
8991
let node = Node::new_no_wallet();
9092
let block_hash = best_block_hash();
9193
let json = node.client.get_block_stats_by_block_hash(&block_hash).expect("getblockstats");
9294
assert!(json.into_model().is_ok());
9395
}
9496

97+
9598
#[test]
9699
fn get_block_stats_by_height_txindex() {
97100
let node = Node::new_no_wallet_txindex();
@@ -130,37 +133,37 @@ fn get_difficulty() {
130133

131134
#[test]
132135
#[cfg(feature = "TODO")]
133-
fn get_mempool_ancestors() {}
136+
fn get_mempool_ancestors() { todo!() }
134137

135138
#[test]
136139
#[cfg(feature = "TODO")]
137-
fn get_mempool_descendants() {}
140+
fn get_mempool_descendants() { todo!() }
138141

139142
#[test]
140143
#[cfg(feature = "TODO")]
141-
fn get_mempool_entry() {}
144+
fn get_mempool_entry() { todo!() }
142145

143146
#[test]
144147
#[cfg(feature = "TODO")]
145-
fn get_mempool_info() {}
148+
fn get_mempool_info() { todo!() }
146149

147150
#[test]
148151
#[cfg(feature = "TODO")]
149-
fn get_raw_mempool() {}
152+
fn get_raw_mempool() { todo!() }
150153

151154
#[test]
152155
#[cfg(feature = "TODO")]
153-
fn get_tx_out() {}
156+
fn get_tx_out() { todo!() }
154157

155158
#[test]
156159
#[cfg(feature = "TODO")]
157-
fn get_tx_out_proof() {}
160+
fn get_tx_out_proof() { todo!() }
158161

159162
#[test]
160163
#[cfg(feature = "TODO")]
161-
fn get_tx_out_set_info() {}
164+
fn get_tx_out_set_info() { todo!() }
162165

163166
#[test]
164167
#[cfg(feature = "TODO")]
165-
fn verify_tx_out_proof() {}
168+
fn verify_tx_out_proof() { todo!() }
166169

types/src/v17/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
//! | lockunspent | omitted |
185185
//! | move | omitted |
186186
//! | removeprunedfunds | omitted |
187-
//! | rescanblockchain | done |
187+
//! | rescanblockchain | done (untested) |
188188
//! | sendfrom | omitted |
189189
//! | sendmany | done (untested) |
190190
//! | sendtoaddress | done |
@@ -207,7 +207,7 @@
207207
//!
208208
//! | JSON-PRC Method Name | Status |
209209
//! |:-----------------------------------|:---------------:|
210-
//! | getzmqnotifications` | done (untested) |
210+
//! | getzmqnotifications | done (untested) |
211211
//!
212212
//! </details>
213213
//!
@@ -260,4 +260,5 @@ pub use self::{
260260
SignErrorData, SignMessage, SignRawTransactionWithWallet, TransactionCategory,
261261
WalletCreateFundedPsbt, WalletProcessPsbt,
262262
},
263+
zmq::GetZmqNotifications,
263264
};

0 commit comments

Comments
 (0)