Skip to content

Commit 2f26d8e

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#23725: test: fix feature_coinstatsindex.py --descriptors and add to test runner
61fb410 test: add feature_coinstatsindex.py --descriptors to test_runner.py (Sebastian Falbesoner) 50b044a test: fix test feature_coinstatsindex.py for descriptor wallets (Sebastian Falbesoner) Pull request description: The functional test feature_coinstatsindex.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`; or if BDB is not compiled, see bitcoin/bitcoin#23682 (comment)). 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. Should further pave the way for #23682. ACKs for top commit: MarcoFalke: cr ACK 61fb410 Tree-SHA512: 300a53f539c0b874da5fc1dd1e4e41b9408dc5526c5858c79f0aabf2ab07e57df4c9cc627fafe25246206752754a91a2977a3df8f8b2d98fb98e51c7e4d81633
2 parents c840ab0 + 61fb410 commit 2f26d8e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

test/functional/feature_coinstatsindex.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def set_test_params(self):
4040
self.num_nodes = 2
4141
self.supports_cli = False
4242
self.extra_args = [
43-
[],
43+
# Explicitly set the output type in order to have consistent tx vsize / fees
44+
# for both legacy and descriptor wallets (disables the change address type detection algorithm)
45+
["-addresstype=bech32", "-changetype=bech32"],
4446
["-coinstatsindex"]
4547
]
4648

test/functional/interface_bitcoin_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def run_test(self):
140140

141141
if self.is_specified_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
143+
# Explicitly set the output type in order to have consistent tx vsize / fees
144144
# for both legacy and descriptor wallets (disables the change address type detection algorithm)
145145
self.restart_node(0, extra_args=["-addresstype=bech32", "-changetype=bech32"])
146146
assert_equal(Decimal(cli_get_info['Balance']), BALANCE)

test/functional/test_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@
304304
'feature_txindex_compatibility.py',
305305
'feature_logging.py',
306306
'feature_anchors.py',
307-
'feature_coinstatsindex.py',
307+
'feature_coinstatsindex.py --legacy-wallet',
308+
'feature_coinstatsindex.py --descriptors',
308309
'wallet_orphanedreward.py',
309310
'p2p_node_network_limited.py',
310311
'p2p_permissions.py',

0 commit comments

Comments
 (0)