Skip to content

Commit 508d5cf

Browse files
committed
test: enable v31 integration tests
Drop the v30_and_below gates from tests covering RPCs unchanged in v31.
1 parent 36c47e1 commit 508d5cf

7 files changed

Lines changed: 2 additions & 26 deletions

File tree

integration_test/tests/blockchain.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
#![allow(non_snake_case)] // Test names intentionally use double underscore.
66

7-
#[cfg(feature = "v30_and_below")]
87
use bitcoin::consensus::encode;
98
use bitcoin::hex;
109
use bitcoind::vtype::*; // All the version specific types.
@@ -238,7 +237,6 @@ fn blockchain__get_block_filter__modelled() {
238237
}
239238

240239
#[test]
241-
#[cfg(feature = "v30_and_below")]
242240
#[cfg(not(feature = "v22_and_below"))]
243241
fn blockchain__get_block_from_peer() {
244242
use bitcoin::hashes::Hash;
@@ -887,7 +885,6 @@ fn blockchain__wait_for_block_height__modelled() {
887885
}
888886

889887
#[test]
890-
#[cfg(feature = "v30_and_below")]
891888
fn blockchain__wait_for_new_block__modelled() {
892889
let (node1, node2, _node3) = integration_test::three_node_network();
893890
node1.fund_wallet();

integration_test/tests/blockchain_core.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! rpc_txoutproof.py, rpc_scantxoutset.py, rpc_gettxspendingprevout.py,
55
//! rpc_dumptxoutset.py and rpc_getblockstats.py
66
7-
#[cfg(feature = "v30_and_below")]
87
use bitcoind::mtype;
98
use bitcoind::vtype::*;
109
use integration_test::{BitcoinD, BitcoinDExt as _, Wallet};
@@ -22,7 +21,6 @@ fn get_blockchain_info_pruned_node_has_prune_fields() {
2221
}
2322

2423
#[test]
25-
#[cfg(feature = "v30_and_below")]
2624
fn get_chain_tx_stats_default_window_has_optional_fields() {
2725
let node = BitcoinD::with_wallet(Wallet::Default, &[]);
2826
let addr = node.client.new_address().unwrap();
@@ -39,7 +37,6 @@ fn get_chain_tx_stats_default_window_has_optional_fields() {
3937
}
4038

4139
#[test]
42-
#[cfg(feature = "v30_and_below")]
4340
fn get_chain_tx_stats_pinned_to_block1_has_no_window_fields() {
4441
let node = BitcoinD::with_wallet(Wallet::Default, &[]);
4542
let addr = node.client.new_address().unwrap();

integration_test/tests/hidden.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,25 @@
44
55
#![allow(non_snake_case)] // Test names intentionally use double underscore.
66

7-
#[cfg(feature = "v30_and_below")]
87
#[cfg(not(feature = "v28_and_below"))]
98
use std::collections::HashMap;
109

11-
#[cfg(feature = "v30_and_below")]
1210
#[cfg(not(feature = "v28_and_below"))]
1311
use bitcoin::hashes::Hash;
14-
#[cfg(feature = "v30_and_below")]
1512
#[cfg(not(feature = "v28_and_below"))]
1613
use bitcoin::hex::DisplayHex;
17-
#[cfg(feature = "v30_and_below")]
1814
#[cfg(not(feature = "v28_and_below"))]
1915
use bitcoin::{
2016
absolute, consensus, transaction, Amount, OutPoint, ScriptBuf, Sequence, Transaction, TxIn,
2117
TxOut, Txid, Witness,
2218
};
2319
use bitcoind::mtype;
2420
use bitcoind::vtype::*; // All the version specific types.
25-
#[cfg(feature = "v30_and_below")]
2621
#[cfg(not(feature = "v21_and_below"))]
2722
use bitcoind::P2P;
2823
use integration_test::{BitcoinD, BitcoinDExt as _, Wallet};
2924

3025
#[test]
31-
#[cfg(feature = "v30_and_below")]
3226
#[cfg(not(feature = "v21_and_below"))]
3327
fn hidden__add_connection() {
3428
let (listener, dialer, _node3) = integration_test::three_node_network();
@@ -104,7 +98,6 @@ fn hidden__estimate_raw_fee__modelled() {
10498
}
10599

106100
#[test]
107-
#[cfg(feature = "v30_and_below")]
108101
#[cfg(not(feature = "v28_and_below"))]
109102
fn hidden__get_orphan_txs__modelled() {
110103
// We use node1 to send node2 orphan transactions via a P2P `tx` message.

integration_test/tests/mining.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
#![allow(non_snake_case)] // Test names intentionally use double underscore.
66

77
use bitcoin::SignedAmount;
8-
use bitcoind::mtype;
98
use bitcoind::vtype::*;
10-
#[cfg(feature = "v30_and_below")]
11-
use bitcoind::{TemplateRequest, TemplateRules};
9+
use bitcoind::{mtype, TemplateRequest, TemplateRules};
1210
use integration_test::{BitcoinD, BitcoinDExt as _, Wallet}; // All the version specific types.
1311

1412
#[test]
15-
#[cfg(feature = "v30_and_below")]
1613
fn mining__get_block_template__modelled() {
1714
// Requires connected nodes otherwise the RPC call errors.
1815
let (node1, node2, node3) = integration_test::three_node_network();

integration_test/tests/mining_core.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#[cfg(not(feature = "v25_and_below"))]
66
use bitcoin::SignedAmount;
77
use bitcoind::vtype::*;
8-
#[cfg(feature = "v30_and_below")]
98
use bitcoind::{TemplateRequest, TemplateRules};
109
use integration_test::{BitcoinD, BitcoinDExt as _, Wallet};
1110

@@ -53,7 +52,6 @@ fn generate_block_with_empty_tx_list() {
5352
}
5453

5554
#[test]
56-
#[cfg(feature = "v30_and_below")]
5755
fn get_block_template_has_optional_fields() {
5856
let (node1, _node2, _node3) = integration_test::three_node_network();
5957
node1.fund_wallet();
@@ -74,7 +72,6 @@ fn get_block_template_has_optional_fields() {
7472
}
7573

7674
#[test]
77-
#[cfg(feature = "v30_and_below")]
7875
fn get_block_template_includes_mempool_tx() {
7976
let (node1, _node2, _node3) = integration_test::three_node_network();
8077
node1.fund_wallet();

integration_test/tests/network.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
55
#![allow(non_snake_case)] // Test names intentionally use double underscore.
66

7-
#[cfg(feature = "v30_and_below")]
8-
use bitcoind::mtype;
97
use bitcoind::vtype::*; // All the version specific types.
10-
use bitcoind::{AddNodeCommand, SetBanCommand};
8+
use bitcoind::{mtype, AddNodeCommand, SetBanCommand};
119
use integration_test::{BitcoinD, BitcoinDExt as _, Wallet};
1210

1311
#[test]
@@ -36,7 +34,6 @@ fn network__clear_banned() {
3634
}
3735

3836
#[test]
39-
#[cfg(feature = "v30_and_below")]
4037
fn network__disconnect_node() {
4138
let (_node1, node2, _node3) = integration_test::three_node_network();
4239

@@ -78,7 +75,6 @@ fn network__get_net_totals() {
7875
}
7976

8077
#[test]
81-
#[cfg(feature = "v30_and_below")]
8278
fn network__get_network_info__modelled() {
8379
let node = BitcoinD::with_wallet(Wallet::None, &[]);
8480
let json: GetNetworkInfo = node.client.get_network_info().expect("getnetworkinfo");

integration_test/tests/network_core.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ fn get_network_info_local_services_names_non_empty() {
7070

7171
#[test]
7272
#[cfg(not(feature = "v20_and_below"))]
73-
#[cfg(feature = "v30_and_below")]
7473
fn get_network_info_connections_sum_matches_total() {
7574
let (node1, _node2, _node3) = integration_test::three_node_network();
7675

0 commit comments

Comments
 (0)