Skip to content

Commit 810476f

Browse files
committed
test: Remove unused options and variables, correct comments
1 parent 04a7a7a commit 810476f

File tree

9 files changed

+9
-25
lines changed

9 files changed

+9
-25
lines changed

test/functional/feature_bip68_sequence.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def set_test_params(self):
5555
'-testactivationheight=csv@432',
5656
],
5757
]
58-
self.uses_wallet = None
5958

6059
def run_test(self):
6160
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]

test/functional/rpc_rawtransaction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def set_test_params(self):
7474
# whitelist peers to speed up tx relay / mempool sync
7575
self.noban_tx_relay = True
7676
self.supports_cli = False
77-
self.uses_wallet = None
7877

7978
def setup_network(self):
8079
super().setup_network()

test/functional/test_framework/test_framework.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def __init__(self, test_file) -> None:
161161
self.wallet_names = None
162162
# By default the wallet is not required. Set to true by skip_if_no_wallet().
163163
# Can also be set to None to indicate that the wallet will be used if available.
164-
# When False or None, we ignore wallet_names regardless of what it is.
164+
# When False or None, we ignore wallet_names in setup_nodes().
165165
self.uses_wallet = False
166166
# Disable ThreadOpenConnections by default, so that adding entries to
167167
# addrman will not result in automatic connections to them.
@@ -487,10 +487,6 @@ def init_wallet(self, *, node):
487487
n.createwallet(wallet_name=wallet_name, load_on_startup=True)
488488
n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase', rescan=True)
489489

490-
# Only enables wallet support when the module is available
491-
def enable_wallet_if_possible(self):
492-
self._requires_wallet = self.is_wallet_compiled()
493-
494490
def run_test(self):
495491
"""Tests must override this method to define test logic"""
496492
raise NotImplementedError

test/functional/test_framework/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=
459459
f.write("printtoconsole=0\n")
460460
f.write("natpmp=0\n")
461461
f.write("shrinkdebugfile=0\n")
462-
f.write("deprecatedrpc=create_bdb\n") # Required to run the tests
463462
# To improve SQLite wallet performance so that the tests don't timeout, use -unsafesqlitesync
464463
f.write("unsafesqlitesync=1\n")
465464
if disable_autoconnect:

test/functional/test_runner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import re
3030
import logging
3131

32-
os.environ["REQUIRE_WALLET_TYPE_SET"] = "1"
33-
3432
# Minimum amount of space to run the tests.
3533
MIN_FREE_SPACE = 1.1 * 1024 * 1024 * 1024
3634
# Additional space to run an extra job.

test/functional/tool_wallet.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,17 @@
2020

2121

2222
class ToolWalletTest(BitcoinTestFramework):
23-
def add_options(self, parser):
24-
parser.add_argument("--bdbro", action="store_true", help="Use the BerkeleyRO internal parser when dumping a Berkeley DB wallet file")
25-
parser.add_argument("--swap-bdb-endian", action="store_true",help="When making Legacy BDB wallets, always make then byte swapped internally")
26-
2723
def set_test_params(self):
2824
self.num_nodes = 1
2925
self.setup_clean_chain = True
3026
self.rpc_timeout = 120
31-
if self.options.swap_bdb_endian:
32-
self.extra_args = [["-swapbdbendian"]]
3327

3428
def skip_test_if_missing_module(self):
3529
self.skip_if_no_wallet()
3630
self.skip_if_no_wallet_tool()
3731

3832
def bitcoin_wallet_process(self, *args):
3933
default_args = ['-datadir={}'.format(self.nodes[0].datadir_path), '-chain=%s' % self.chain]
40-
if "dump" in args and self.options.bdbro:
41-
default_args.append("-withinternalbdb")
4234

4335
return subprocess.Popen(self.get_binaries().wallet_argv() + default_args + list(args), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
4436

test/functional/wallet_createwallet.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
EMPTY_PASSPHRASE_MSG = "Empty string given as passphrase, wallet will not be encrypted."
18-
LEGACY_WALLET_MSG = "Wallet created successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future."
1918

2019

2120
class CreateWalletTest(BitcoinTestFramework):
@@ -27,7 +26,6 @@ def skip_test_if_missing_module(self):
2726

2827
def run_test(self):
2928
node = self.nodes[0]
30-
self.generate(node, 1) # Leave IBD for sethdseed
3129

3230
self.log.info("Run createwallet with invalid parameters.")
3331
# Run createwallet with invalid parameters. This must not prevent a new wallet with the same name from being created with the correct parameters.

test/functional/wallet_hd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def run_test(self):
4343

4444
# This should be enough to keep the master key and the non-HD key
4545
self.nodes[1].backupwallet(self.nodes[1].datadir_path / "hd.bak")
46-
#self.nodes[1].dumpwallet(self.nodes[1].datadir_path / "hd.dump")
4746

4847
# Derive some HD addresses and remember the last
4948
# Also send funds to each add

test/functional/wallet_migration.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ def skip_test_if_missing_module(self):
4747
self.skip_if_no_previous_releases()
4848

4949
def setup_nodes(self):
50-
self.add_nodes(self.num_nodes, versions=[
51-
None,
52-
280000,
53-
])
50+
self.add_nodes(
51+
self.num_nodes,
52+
extra_args=self.extra_args,
53+
versions=[
54+
None,
55+
280000,
56+
],
57+
)
5458
self.start_nodes()
5559
self.init_wallet(node=0)
5660

0 commit comments

Comments
 (0)