Skip to content

Commit

Permalink
Merge f727d81 into merged_master (Bitcoin PR bitcoin/bitcoin#23712)
Browse files Browse the repository at this point in the history
  • Loading branch information
delta1 committed Jun 6, 2023
2 parents c7c59a2 + f727d81 commit 4c0504b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/functional/interface_bitcoin_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ def cli_get_info_string_to_dict(cli_get_info_string):


class TestBitcoinCli(BitcoinTestFramework):
def is_specified_wallet_compiled(self):
if self.options.descriptors:
return self.is_sqlite_compiled()
else:
return self.is_bdb_compiled()

def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
if self.is_wallet_compiled():
if self.is_specified_wallet_compiled():
self.requires_wallet = True

def skip_test_if_missing_module(self):
Expand Down Expand Up @@ -117,7 +123,7 @@ def run_test(self):
assert_raises_process_error(1, "Invalid value for -color option. Valid values: always, auto, never.", self.nodes[0].cli('-getinfo', '-color=foo').send_cli)

self.log.info("Test -getinfo returns expected network and blockchain info")
if self.is_wallet_compiled():
if self.is_specified_wallet_compiled():
self.nodes[0].encryptwallet(password)
cli_get_info_string = self.nodes[0].cli('-getinfo').send_cli()
cli_get_info = cli_get_info_string_to_dict(cli_get_info_string)
Expand All @@ -144,8 +150,8 @@ def run_test(self):
cli_get_info = cli_get_info_string_to_dict(cli_get_info_string)
assert_equal(cli_get_info["Proxies"], "127.0.0.1:9050 (ipv4, ipv6, onion, cjdns), 127.0.0.1:7656 (i2p)")

if self.is_wallet_compiled():
self.log.info("Test -getinfo and elements-cli getwalletinfo return expected wallet info")
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
# for both legacy and descriptor wallets (disables the change address type detection algorithm)
self.restart_node(0, extra_args=["-addresstype=bech32", "-changetype=bech32"])
Expand Down

0 comments on commit 4c0504b

Please sign in to comment.