Skip to content

Commit 877f3aa

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#23686: test: fix interface_bitcoin_cli.py --descriptors and add to test runner
035767f test: add interface_bitcoin_cli.py --descriptors to test_runner.py (Sebastian Falbesoner) e4fa28a 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
2 parents 6223e55 + 035767f commit 877f3aa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/functional/interface_bitcoin_cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ def run_test(self):
140140

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

test/functional/test_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@
138138
'feature_fee_estimation.py',
139139
'interface_zmq.py',
140140
'rpc_invalid_address_message.py',
141-
'interface_bitcoin_cli.py',
141+
'interface_bitcoin_cli.py --legacy-wallet',
142+
'interface_bitcoin_cli.py --descriptors',
142143
'feature_bind_extra.py',
143144
'mempool_resurrect.py',
144145
'wallet_txn_doublespend.py --mineblock',

0 commit comments

Comments
 (0)