HomePhabricator

Avoid dumpprivkey in wallet_listsinceblock.py

Description

Avoid dumpprivkey in wallet_listsinceblock.py

Summary:
Generate a privkey in the test framework instead of using dumpprivkey so
that descriptor wallets work in this test.

This is a backport of core#18788 [4/16] & core#20322 (adds a sync_all)
https://github.com/bitcoin/bitcoin/pull/18788/commits/c2711e4230d9a423ead24f6609691fb338b1d26b
https://github.com/bitcoin/bitcoin/pull/20322/commits/444412821e5349ce0e0b039d884583edb70c4399

I also had to add a key_to_p2pkh_cashaddr function to get the address in the correct format. This has the added benefit of adding coverage for cashaddr.encode[_full] which was unused before this commit, as far as I can tell.

Test Plan: test/functional/test_runner.py wallet_listsinceblock

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Apr 6 2020, 19:50
PiRKCommitted on Dec 13 2021, 07:48
PiRKPushed on Dec 13 2021, 07:48
Reviewer
Restricted Project
Differential Revision
D10656: Avoid dumpprivkey in wallet_listsinceblock.py
Parents
rABC6db5714389a7: Bump version to 0.24.8
Branches
Unknown
Tags
Unknown