test: remove legacy wallet functional tests

Removes all legacy wallet specific functional tests.

Also removes the --descriptor and --legacy-wallet options as these are
no longer necessary with the legacy wallet removed.
This commit is contained in:
Ava Chow committed 2025-04-23 12:10:30 -07:00
1 parent 20a9173717
commit c847dee148
96 files changed
+389 -4669

No files matched your search

-31
View File
@@ -33,7 +33,6 @@ and confirm again balances are correct.
from decimal import Decimal
import os
from random import randint
import shutil
from test_framework.blocktools import COINBASE_MATURITY
from test_framework.test_framework import BitcoinTestFramework
@@ -44,9 +43,6 @@ from test_framework.util import (
class WalletBackupTest(BitcoinTestFramework):
def add_options(self, parser):
self.add_wallet_options(parser)
def set_test_params(self):
self.num_nodes = 4
self.setup_clean_chain = True
@@ -181,10 +177,6 @@ class WalletBackupTest(BitcoinTestFramework):
for node_num in range(3):
self.nodes[node_num].backupwallet(self.nodes[node_num].datadir_path / 'wallet.bak')
if not self.options.descriptors:
for node_num in range(3):
self.nodes[node_num].dumpwallet(self.nodes[node_num].datadir_path / 'wallet.dump')
self.log.info("More transactions")
for _ in range(5):
self.do_one_round()
@@ -228,29 +220,6 @@ class WalletBackupTest(BitcoinTestFramework):
self.restore_wallet_existent_name()
if not self.options.descriptors:
self.log.info("Restoring using dumped wallet")
self.stop_three()
self.erase_three()
#start node2 with no chain
shutil.rmtree(self.nodes[2].blocks_path)
shutil.rmtree(self.nodes[2].chain_path / 'chainstate')
self.start_three(["-nowallet"])
# Create new wallets for the three nodes.
# We will use this empty wallets to test the 'importwallet()' RPC command below.
for node_num in range(3):
self.nodes[node_num].createwallet(wallet_name=self.default_wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
assert_equal(self.nodes[node_num].getbalance(), 0)
self.nodes[node_num].importwallet(self.nodes[node_num].datadir_path / 'wallet.dump')
self.sync_blocks()
assert_equal(self.nodes[0].getbalance(), balance0)
assert_equal(self.nodes[1].getbalance(), balance1)
assert_equal(self.nodes[2].getbalance(), balance2)
# Backup to source wallet file must fail
sourcePaths = [
os.path.join(self.nodes[0].wallets_path, self.default_wallet_name, self.wallet_data_filename),