Merge bitcoin/bitcoin#23686: test: fix `interface_bitcoin_cli.py --descriptors` and add to test runner

035767f54a test: add interface_bitcoin_cli.py --descriptors to test_runner.py (Sebastian Falbesoner)
e4fa28a322 test: fix test interface_bitcoin_cli.py for descriptor wallets (Sebastian Falbesoner)

Pull request description:

  The functional test interface_bitcoin_cli.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`), see #23684. This is due to the fact that different change output types are used for created transactions (P2WPKH for legacy wallets, P2TR for descriptor wallets; the former doesn't have a ScriptPubKeyMan for bech32m), resulting in different tx sizes and hence also fees. Fix this by explicitely setting the output type via passing both `-addresstype=bech32` and `-changetype=bech32` as argument. The former would not be needed by now, but makes the test more deterministic and avoids a failure if bech32m becomes the default address type.

  Fixes #23684, should also pave the way for #23682.

Top commit has no ACKs.

Tree-SHA512: 39b780e25e4c7094cb3378e0f10d4a8aebac1500b7b2d68de47e54e23b9b5efe5afcf8765bb8398eeaf56968e2586a1b294a0f8773c7d90f4188a0f00b8501ff
pull/826/head
MarcoFalke 3 years ago
commit 877f3aa85c
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -140,6 +140,9 @@ class TestBitcoinCli(BitcoinTestFramework):
if self.is_wallet_compiled(): if self.is_wallet_compiled():
self.log.info("Test -getinfo and bitcoin-cli getwalletinfo return expected wallet info") self.log.info("Test -getinfo and bitcoin-cli getwalletinfo return expected wallet info")
# Explicitely set the output type in order to have constintent tx vsize / fees
# for both legacy and descriptor wallets (disables the change address type detection algorithm)
self.restart_node(0, extra_args=["-addresstype=bech32", "-changetype=bech32"])
assert_equal(Decimal(cli_get_info['Balance']), BALANCE) assert_equal(Decimal(cli_get_info['Balance']), BALANCE)
assert 'Balances' not in cli_get_info_string assert 'Balances' not in cli_get_info_string
wallet_info = self.nodes[0].getwalletinfo() wallet_info = self.nodes[0].getwalletinfo()

@ -138,7 +138,8 @@ BASE_SCRIPTS = [
'feature_fee_estimation.py', 'feature_fee_estimation.py',
'interface_zmq.py', 'interface_zmq.py',
'rpc_invalid_address_message.py', 'rpc_invalid_address_message.py',
'interface_bitcoin_cli.py', 'interface_bitcoin_cli.py --legacy-wallet',
'interface_bitcoin_cli.py --descriptors',
'feature_bind_extra.py', 'feature_bind_extra.py',
'mempool_resurrect.py', 'mempool_resurrect.py',
'wallet_txn_doublespend.py --mineblock', 'wallet_txn_doublespend.py --mineblock',

Loading…
Cancel
Save