Adds a --descriptors option globally to the test framework. This will
make the test create and use descriptor wallets. However some tests may
not work with this.Some tests are modified to work with --descriptors and run with that
option in test_runer:
- wallet_encryption.py
- wallet_keypool.py
- wallet_keypool_topup.py
- wallet_labels.py
- wallet_avoidreuse.py
This is a backport of core#16528 [43a/43]
https://github.com/bitcoin/bitcoin/pull/16528/commits/223588b1bbc63dc57098bbd0baa48635e0cc0b82
I'm splitting this commit into multiple commits to make review easier.
This first part contains everything that works more or less out of the
box and does not require significant changes to work with our codebase.
All the deviations from the original PR in this revision are explained by out of order
backports and lack of segwit and bech32. For instance, changes to key.py
were already included in D8475 & D9934. Deviations in RPCOverloadWrapper.createwallet
are explained by D10185 and D9101.
I excluded specifically 3 tests that require changes to transaction
amounts and fees when descriptors are used. With our codebase,
descriptor wallets generate different fees, because in some situations
the legacy wallet generates legacy p2pkh outputs and descriptor wallets generate
scriptPubKey / p2sh outputs. I will address these in one or two
separate diffs.
These excluded tests are:
- rpc_psbt.py
- wallet_basic.py
- wallet_keypool.py