HomePhabricator

Add a --descriptors option to various tests

Description

Add a --descriptors option to various tests

Summary:

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

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10213

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Jul 16 2019, 19:33
PiRKCommitted on Oct 5 2021, 08:38
PiRKPushed on Oct 5 2021, 08:38
Reviewer
Restricted Project
Differential Revision
D10213: Add a --descriptors option to various tests
Parents
rABCfd6a2c27546d: Test batch rpc with params
Branches
Unknown
Tags
Unknown