This PR enables one more of the non-wallet functional tests (rpc_scantxoutset.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078 and #23858#issue-1088320649 more recently.
Reviewer’s guide:
- [commit 1/3] For replacing the getnewaddress/getaddressinfo RPC calls a helper
getnewdestination
is introduced which allows to create addresses with the common address format types (’legacy’, ‘p2sh-segwit’ and ‘bech32’), but also additionally returns the corresponding pubkey and output script. - [commit 2/3] In order to send to addresses with MiniWallet, a helper
address_to_scriptpubkey
is introduced. It only supports legacy addresses (Base58Check) so far, which is sufficient for the scantxoutset test. - [commit 3/3] With those helpers, the use of MiniWallet in the test is quite straight-forward. To avoid repeatedly specifying parameters like
from_node
to MiniWallet’ssend_to
method, another test-internal helpersendtodestination
is introduced which supports specifying the destination both as outputscript or as address.