aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-09 17:54:15 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-09 17:54:21 +0100
commit2f26d8ec703c1cfdc0d883501d7b327335e1b602 (patch)
treea54961c638857fa1d051acab25c0429eb302fb7e
parentc840ab0231bc29057172179f005001c9ab299554 (diff)
parent61fb410c0d9bc9e5fe4e3c52b4c519d49faf15f6 (diff)
downloadbitcoin-2f26d8ec703c1cfdc0d883501d7b327335e1b602.tar.xz
Merge bitcoin/bitcoin#23725: test: fix `feature_coinstatsindex.py --descriptors` and add to test runner
61fb410c0d9bc9e5fe4e3c52b4c519d49faf15f6 test: add feature_coinstatsindex.py --descriptors to test_runner.py (Sebastian Falbesoner) 50b044a88e3cfa67e28261333e658f4288d54018 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 https://github.com/bitcoin/bitcoin/pull/23682#issuecomment-989827592). 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 61fb410c0d9bc9e5fe4e3c52b4c519d49faf15f6 Tree-SHA512: 300a53f539c0b874da5fc1dd1e4e41b9408dc5526c5858c79f0aabf2ab07e57df4c9cc627fafe25246206752754a91a2977a3df8f8b2d98fb98e51c7e4d81633
-rwxr-xr-xtest/functional/feature_coinstatsindex.py4
-rwxr-xr-xtest/functional/interface_bitcoin_cli.py2
-rwxr-xr-xtest/functional/test_runner.py3
3 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/feature_coinstatsindex.py b/test/functional/feature_coinstatsindex.py
index 8afd0ff74a..c70f8a83db 100755
--- a/test/functional/feature_coinstatsindex.py
+++ b/test/functional/feature_coinstatsindex.py
@@ -40,7 +40,9 @@ class CoinStatsIndexTest(BitcoinTestFramework):
self.num_nodes = 2
self.supports_cli = False
self.extra_args = [
- [],
+ # Explicitly set the output type in order to have consistent tx vsize / fees
+ # for both legacy and descriptor wallets (disables the change address type detection algorithm)
+ ["-addresstype=bech32", "-changetype=bech32"],
["-coinstatsindex"]
]
diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py
index 2ea9ebfc98..db5564ac50 100755
--- a/test/functional/interface_bitcoin_cli.py
+++ b/test/functional/interface_bitcoin_cli.py
@@ -140,7 +140,7 @@ class TestBitcoinCli(BitcoinTestFramework):
if self.is_specified_wallet_compiled():
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
+ # Explicitly set the output type in order to have consistent 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)
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 0a764a1755..675f9aa8ff 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -304,7 +304,8 @@ BASE_SCRIPTS = [
'feature_txindex_compatibility.py',
'feature_logging.py',
'feature_anchors.py',
- 'feature_coinstatsindex.py',
+ 'feature_coinstatsindex.py --legacy-wallet',
+ 'feature_coinstatsindex.py --descriptors',
'wallet_orphanedreward.py',
'p2p_node_network_limited.py',
'p2p_permissions.py',