mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
00d2d7fac3
590bda79e876d9b959083105b8c7c41dd87706eb scripted-diff: Remove setup_clean_chain if default is not changed (Fabian Jahr) 98892f39e3d079c73bff7f2a5d5420fa95270497 doc: Improve setup_clean_chain documentation (Fabian Jahr) Pull request description: The first commit improves documentation on setup_clean_chain which is misunderstood quite frequently. Most importantly it fixes the TestShell docs which are simply incorrect. The second commit removes the instances of `setup_clean_clain` in functional tests where it is not changing the default. This used to be part of #19168 which also sought to rename`setup_clean_chain`. ACKs for top commit: jonatack: ACK 590bda79e876d9b959083105b8c7c41dd87706eb Tree-SHA512: a7881186e65d31160b8f84107fb185973b37c6e50f190a85c6e2906a13a7472bb4efa9440bd37fe0a9ac5cd2d1e8559870a7e4380632d9a249eca8980b945f3e
43 lines
1.5 KiB
Python
Executable File
43 lines
1.5 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) 2020 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
"""
|
|
Test deprecation of the RPC getaddressinfo `label` field. It has been
|
|
superceded by the `labels` field.
|
|
|
|
"""
|
|
from test_framework.test_framework import BitcoinTestFramework
|
|
|
|
class GetAddressInfoLabelDeprecationTest(BitcoinTestFramework):
|
|
def set_test_params(self):
|
|
self.num_nodes = 2
|
|
# Start node[0] with -deprecatedrpc=label, and node[1] without.
|
|
self.extra_args = [["-deprecatedrpc=label"], []]
|
|
|
|
def skip_test_if_missing_module(self):
|
|
self.skip_if_no_wallet()
|
|
|
|
def test_label_with_deprecatedrpc_flag(self):
|
|
self.log.info("Test getaddressinfo label with -deprecatedrpc flag")
|
|
node = self.nodes[0]
|
|
address = node.getnewaddress()
|
|
info = node.getaddressinfo(address)
|
|
assert "label" in info
|
|
|
|
def test_label_without_deprecatedrpc_flag(self):
|
|
self.log.info("Test getaddressinfo label without -deprecatedrpc flag")
|
|
node = self.nodes[1]
|
|
address = node.getnewaddress()
|
|
info = node.getaddressinfo(address)
|
|
assert "label" not in info
|
|
|
|
def run_test(self):
|
|
"""Test getaddressinfo label with and without -deprecatedrpc flag."""
|
|
self.test_label_with_deprecatedrpc_flag()
|
|
self.test_label_without_deprecatedrpc_flag()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
GetAddressInfoLabelDeprecationTest().main()
|