tests: Add a --legacy-wallet that is mutually exclusive with --descriptors

Although legacy wallet is still the default, for future use, add a
--legacy-wallet option to the test framework. Additional tests for
descriptor wallets have been enabled with the --descriptors option.
Tests that must be legacy wallet only are being started with
--legacy-wallet. Even though this option does not currently do anything,
this will be helpful in the future when descriptor wallets become the
default.
This commit is contained in:
Andrew Chow 2020-04-27 15:38:20 -04:00
parent 388053e172
commit 242aed7cc1
2 changed files with 36 additions and 10 deletions

View file

@ -183,9 +183,14 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
help="run nodes under the valgrind memory error detector: expect at least a ~10x slowdown, valgrind 3.14 or later required") help="run nodes under the valgrind memory error detector: expect at least a ~10x slowdown, valgrind 3.14 or later required")
parser.add_argument("--randomseed", type=int, parser.add_argument("--randomseed", type=int,
help="set a random seed for deterministically reproducing a previous test run") help="set a random seed for deterministically reproducing a previous test run")
parser.add_argument("--descriptors", default=False, action="store_true",
help="Run test using a descriptor wallet")
parser.add_argument('--timeout-factor', dest="timeout_factor", type=float, default=1.0, help='adjust test timeouts by a factor. Setting it to 0 disables all timeouts') parser.add_argument('--timeout-factor', dest="timeout_factor", type=float, default=1.0, help='adjust test timeouts by a factor. Setting it to 0 disables all timeouts')
group = parser.add_mutually_exclusive_group()
group.add_argument("--descriptors", default=False, action="store_true",
help="Run test using a descriptor wallet", dest='descriptors')
group.add_argument("--legacy-wallet", default=False, action="store_false",
help="Run test using legacy wallets", dest='descriptors')
self.add_options(parser) self.add_options(parser)
self.options = parser.parse_args() self.options = parser.parse_args()
self.options.previous_releases_path = previous_releases_path self.options.previous_releases_path = previous_releases_path

View file

@ -95,8 +95,9 @@ BASE_SCRIPTS = [
'feature_maxuploadtarget.py', 'feature_maxuploadtarget.py',
'feature_block.py', 'feature_block.py',
'rpc_fundrawtransaction.py', 'rpc_fundrawtransaction.py',
'rpc_fundrawtransaction.py --descriptors',
'p2p_compactblocks.py', 'p2p_compactblocks.py',
'feature_segwit.py', 'feature_segwit.py --legacy-wallet',
# vv Tests less than 2m vv # vv Tests less than 2m vv
'wallet_basic.py', 'wallet_basic.py',
'wallet_basic.py --descriptors', 'wallet_basic.py --descriptors',
@ -106,19 +107,24 @@ BASE_SCRIPTS = [
'p2p_timeouts.py', 'p2p_timeouts.py',
'p2p_tx_download.py', 'p2p_tx_download.py',
'mempool_updatefromblock.py', 'mempool_updatefromblock.py',
'wallet_dump.py', 'wallet_dump.py --legacy-wallet',
'wallet_listtransactions.py', 'wallet_listtransactions.py',
'wallet_listtransactions.py --descriptors',
'feature_taproot.py', 'feature_taproot.py',
# vv Tests less than 60s vv # vv Tests less than 60s vv
'p2p_sendheaders.py', 'p2p_sendheaders.py',
'wallet_importmulti.py', 'wallet_importmulti.py --legacy-wallet',
'mempool_limit.py', 'mempool_limit.py',
'rpc_txoutproof.py', 'rpc_txoutproof.py',
'wallet_listreceivedby.py', 'wallet_listreceivedby.py',
'wallet_listreceivedby.py --descriptors',
'wallet_abandonconflict.py', 'wallet_abandonconflict.py',
'wallet_abandonconflict.py --descriptors',
'feature_csv_activation.py', 'feature_csv_activation.py',
'rpc_rawtransaction.py', 'rpc_rawtransaction.py',
'rpc_rawtransaction.py --descriptors',
'wallet_address_types.py', 'wallet_address_types.py',
'wallet_address_types.py --descriptors',
'feature_bip68_sequence.py', 'feature_bip68_sequence.py',
'p2p_feefilter.py', 'p2p_feefilter.py',
'feature_reindex.py', 'feature_reindex.py',
@ -132,6 +138,7 @@ BASE_SCRIPTS = [
'mempool_resurrect.py', 'mempool_resurrect.py',
'wallet_txn_doublespend.py --mineblock', 'wallet_txn_doublespend.py --mineblock',
'tool_wallet.py', 'tool_wallet.py',
'tool_wallet.py --descriptors',
'wallet_txn_clone.py', 'wallet_txn_clone.py',
'wallet_txn_clone.py --segwit', 'wallet_txn_clone.py --segwit',
'rpc_getchaintips.py', 'rpc_getchaintips.py',
@ -147,8 +154,9 @@ BASE_SCRIPTS = [
'wallet_multiwallet.py --usecli', 'wallet_multiwallet.py --usecli',
'wallet_createwallet.py', 'wallet_createwallet.py',
'wallet_createwallet.py --usecli', 'wallet_createwallet.py --usecli',
'wallet_watchonly.py', 'wallet_createwallet.py --descriptors',
'wallet_watchonly.py --usecli', 'wallet_watchonly.py --legacy-wallet',
'wallet_watchonly.py --usecli --legacy-wallet',
'wallet_reorgsrestore.py', 'wallet_reorgsrestore.py',
'interface_http.py', 'interface_http.py',
'interface_rpc.py', 'interface_rpc.py',
@ -158,13 +166,16 @@ BASE_SCRIPTS = [
'rpc_whitelist.py', 'rpc_whitelist.py',
'feature_proxy.py', 'feature_proxy.py',
'rpc_signrawtransaction.py', 'rpc_signrawtransaction.py',
'rpc_signrawtransaction.py --descriptors',
'wallet_groups.py', 'wallet_groups.py',
'p2p_addrv2_relay.py', 'p2p_addrv2_relay.py',
'wallet_groups.py --descriptors',
'p2p_disconnect_ban.py', 'p2p_disconnect_ban.py',
'rpc_decodescript.py', 'rpc_decodescript.py',
'rpc_blockchain.py', 'rpc_blockchain.py',
'rpc_deprecated.py', 'rpc_deprecated.py',
'wallet_disable.py', 'wallet_disable.py',
'wallet_disable.py --descriptors',
'p2p_addr_relay.py', 'p2p_addr_relay.py',
'p2p_getaddr_caching.py', 'p2p_getaddr_caching.py',
'p2p_getdata.py', 'p2p_getdata.py',
@ -184,6 +195,7 @@ BASE_SCRIPTS = [
'feature_assumevalid.py', 'feature_assumevalid.py',
'example_test.py', 'example_test.py',
'wallet_txn_doublespend.py', 'wallet_txn_doublespend.py',
'wallet_txn_doublespend.py --descriptors',
'feature_backwards_compatibility.py', 'feature_backwards_compatibility.py',
'wallet_txn_clone.py --mineblock', 'wallet_txn_clone.py --mineblock',
'feature_notifications.py', 'feature_notifications.py',
@ -197,17 +209,20 @@ BASE_SCRIPTS = [
'feature_versionbits_warning.py', 'feature_versionbits_warning.py',
'rpc_preciousblock.py', 'rpc_preciousblock.py',
'wallet_importprunedfunds.py', 'wallet_importprunedfunds.py',
'wallet_importprunedfunds.py --descriptors',
'p2p_leak_tx.py', 'p2p_leak_tx.py',
'p2p_eviction.py', 'p2p_eviction.py',
'rpc_signmessage.py', 'rpc_signmessage.py',
'rpc_generateblock.py', 'rpc_generateblock.py',
'rpc_generate.py', 'rpc_generate.py',
'wallet_balance.py', 'wallet_balance.py',
'wallet_balance.py --descriptors',
'feature_nulldummy.py', 'feature_nulldummy.py',
'feature_nulldummy.py --descriptors',
'mempool_accept.py', 'mempool_accept.py',
'mempool_expiry.py', 'mempool_expiry.py',
'wallet_import_rescan.py', 'wallet_import_rescan.py --legacy-wallet',
'wallet_import_with_label.py', 'wallet_import_with_label.py --legacy-wallet',
'wallet_importdescriptors.py --descriptors', 'wallet_importdescriptors.py --descriptors',
'wallet_upgradewallet.py', 'wallet_upgradewallet.py',
'rpc_bind.py --ipv4', 'rpc_bind.py --ipv4',
@ -216,9 +231,11 @@ BASE_SCRIPTS = [
'mining_basic.py', 'mining_basic.py',
'feature_signet.py', 'feature_signet.py',
'wallet_bumpfee.py', 'wallet_bumpfee.py',
'wallet_implicitsegwit.py', 'wallet_bumpfee.py --descriptors',
'wallet_implicitsegwit.py --legacy-wallet',
'rpc_named_arguments.py', 'rpc_named_arguments.py',
'wallet_listsinceblock.py', 'wallet_listsinceblock.py',
'wallet_listsinceblock.py --descriptors',
'p2p_leak.py', 'p2p_leak.py',
'wallet_encryption.py', 'wallet_encryption.py',
'wallet_encryption.py --descriptors', 'wallet_encryption.py --descriptors',
@ -226,16 +243,20 @@ BASE_SCRIPTS = [
'feature_cltv.py', 'feature_cltv.py',
'rpc_uptime.py', 'rpc_uptime.py',
'wallet_resendwallettransactions.py', 'wallet_resendwallettransactions.py',
'wallet_resendwallettransactions.py --descriptors',
'wallet_fallbackfee.py', 'wallet_fallbackfee.py',
'wallet_fallbackfee.py --descriptors',
'rpc_dumptxoutset.py', 'rpc_dumptxoutset.py',
'feature_minchainwork.py', 'feature_minchainwork.py',
'rpc_estimatefee.py', 'rpc_estimatefee.py',
'rpc_getblockstats.py', 'rpc_getblockstats.py',
'wallet_create_tx.py', 'wallet_create_tx.py',
'wallet_send.py', 'wallet_send.py',
'wallet_create_tx.py --descriptors',
'p2p_fingerprint.py', 'p2p_fingerprint.py',
'feature_uacomment.py', 'feature_uacomment.py',
'wallet_coinbase_category.py', 'wallet_coinbase_category.py',
'wallet_coinbase_category.py --descriptors',
'feature_filelock.py', 'feature_filelock.py',
'feature_loadblock.py', 'feature_loadblock.py',
'p2p_dos_header_tree.py', 'p2p_dos_header_tree.py',