From de1b7f6ce007ed7b02aaecd6026d19ce94ba3dd4 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Sat, 7 Dec 2024 10:20:14 +1100 Subject: [PATCH 1/3] node: Make docs into code comments --- node/src/client_versions.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/node/src/client_versions.rs b/node/src/client_versions.rs index c97a7c5..e973681 100644 --- a/node/src/client_versions.rs +++ b/node/src/client_versions.rs @@ -1,10 +1,8 @@ -// All features uses 26_2 -/// The version specific client and json types. -/// -/// **THIS IS AVAILABLE FOR ALL VERSION NUMBER FEATURES** (eg `25_0`, `24_2` etc). This crate is -/// unusual in that it expects exactly one version number feature to be selected, docs.rs is not set -/// up to handle such oddity. -/// +// The version specific client and json types. +// +// **THIS IS AVAILABLE FOR ALL VERSION NUMBER FEATURES** (eg `25_0`, `24_2` etc). This crate is +// unusual in that it expects exactly one version number feature to be selected, docs.rs is not set +// up to handle such oddity. #[cfg(feature = "28_0")] #[allow(unused_imports)] // Not all users need the json types. From 5380f994dcbfde3e332a271f54e64412493a0208 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Sat, 7 Dec 2024 10:23:14 +1100 Subject: [PATCH 2/3] integration_test: Add feature gates Clippy warns of unused functions, feature gate them. --- integration_test/tests/blockchain.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration_test/tests/blockchain.rs b/integration_test/tests/blockchain.rs index 194bb71..c37fe56 100644 --- a/integration_test/tests/blockchain.rs +++ b/integration_test/tests/blockchain.rs @@ -81,12 +81,14 @@ fn get_block_stats() { get_block_stats_by_hash(); } +#[cfg(feature = "0_17_1")] fn get_block_stats_by_height() { let node = Node::new_no_wallet(); let json = node.client.get_block_stats_by_height(0).expect("getblockstats"); assert!(json.into_model().is_ok()); } +#[cfg(feature = "0_17_1")] fn get_block_stats_by_hash() { // verbose = true let node = Node::new_no_wallet(); let block_hash = best_block_hash(); From ea4df6a75ae17380883c0f3fd1c812b69d921222 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Sat, 7 Dec 2024 10:24:11 +1100 Subject: [PATCH 3/3] Remove whitespace line --- integration_test/tests/blockchain.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/integration_test/tests/blockchain.rs b/integration_test/tests/blockchain.rs index c37fe56..fc10fc8 100644 --- a/integration_test/tests/blockchain.rs +++ b/integration_test/tests/blockchain.rs @@ -96,7 +96,6 @@ fn get_block_stats_by_hash() { // verbose = true assert!(json.into_model().is_ok()); } - #[test] fn get_block_stats_by_height_txindex() { let node = Node::new_no_wallet_txindex();