mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
0eba155aa7
facef3d4131f9980a4516282f11731361559509c doc: Explain that anyone can work on good first issues, move text to CONTRIBUTING.md (MarcoFalke) fae2fb2a196ee864e9a13fffc24a0279cd5d17e6 doc: Expand section on Getting Started (MarcoFalke) 100000d1b2c2e38d7a14a31b0af79e0e4316b04c doc: Add headings to CONTRIBUTING.md (MarcoFalke) fab893e0caf510d4836a20194892ef9c71426c51 doc: Fix unrelated typos reported by codespell (MarcoFalke) Pull request description: Some random doc changes: * Add sections to docs, so that they can be linked to * Explain that anyone (even maintainers) are allowed to work on good first issues * Expand section on Getting Started slightly ACKs for top commit: hebasto: ACK facef3d4131f9980a4516282f11731361559509c fanquake: ACK facef3d4131f9980a4516282f11731361559509c Tree-SHA512: 8998e273a76dbf4ca77e79374c14efe4dfcc5c6df6b7d801e1e1e436711dbe6f76b436f9cbc6cacb45a56827babdd6396f3bd376a9426ee7be3bb9b8a3b8e383
43 lines
1.5 KiB
Python
Executable File
43 lines
1.5 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) 2020-2019 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
|
|
superseded 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()
|